XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 11:29 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: How get event target?
PostPosted: September 2nd, 2012, 1:56 am 
Offline
User avatar

Joined: August 29th, 2012, 2:34 am
Posts: 56
When im pulling the "Sender" inside the function i get an error. "function menuItemOnMouseEnter(Sender)"
Code:
function menuItemOnMouseEnter(Sender)
{
    //print(Sender); - prints null (Nothing)

    print(Sender.toString()); // I get a weird character.

    //print(Sender.Target); - prints null (Nothing)
   
    ...myCode
}


Apparently the Sender has some sort of Target but i didn't found any explanation about event / Senders online.
If somebody could name the variable name (if such exist's) it will be very helpful to me.

_________________
Image


Top
 Profile  
 
PostPosted: September 2nd, 2012, 6:15 pm 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
print(Sender.name)


Top
 Profile  
 
PostPosted: September 3rd, 2012, 1:12 am 
Offline
User avatar

Joined: August 29th, 2012, 2:34 am
Posts: 56
For the code:
Code:
function menuItemOnMouseMove(Sender)
{
(line 35)                print(Sender.name);
(line 36)                Sender.Scale = 2;
(line 37)                print(Sender.Scale);
}


I get the following debug error.
Code:
[19:05:47 431]: Widget Debug has ShutDown
[19:05:47 371]: Widget Hide (OnHide)
[19:05:47 222]: Widget is Closing... (OnClose)
[19:05:46 380]: Menu Popup (OnPopupMenu)
[19:05:44 430]: [Script Error (line:37,char:6) ]: EVariantTypeCastError Could not convert variant of type (Dispatch) into type (OleStr)
[19:05:44 428]: print: crclMenuSelectCPU
[19:05:44 138]: Mouse Enter Widget Window (OnEnter)


The problem when line 36 is executed the object won't change his scale value.

_________________
Image


Top
 Profile  
 
PostPosted: September 3rd, 2012, 4:38 pm 
Offline
User avatar

Joined: May 12th, 2012, 8:32 pm
Posts: 594
Hi, What is the "menuItem" ?

Or, you can write this:

Sender.Scale.X = 2;
Sender.Scale.Y = 2;

_________________
XWidget Software Developer
[XWidget for Android] [Lastest version of XWidget] [Lastest patch of XWidget]
[XDesktop for Android/Windows]


Top
 Profile  
 
PostPosted: September 3rd, 2012, 10:55 pm 
Offline
User avatar

Joined: August 29th, 2012, 2:34 am
Posts: 56
Thank you tony so much!!!!
Seance there is no any explanation about how to use scale i had assumed it a scalar. Now when i know its a vector quantity i finality get the result i was expecting for.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Bing [Bot] and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group