I search for a function "if an object exists"

Discuss GUI programming with the MUI Royale plugin here

I search for a function "if an object exists"

Postby sinisrus » Fri May 19, 2017 11:53 am

Hello,

Is there a function to know if a muiroyal object exists or not?

thank you
sinisrus
 
Posts: 185
Joined: Tue Apr 21, 2015 5:43 pm

Re: I search for a function "if an object exists"

Postby airsoftsoftwair » Fri May 19, 2017 11:53 pm

No, but you are right, there should be one. RapaGUI has moai.HaveObject() but MUI Royale is still missing such a function. I'll add it for the next update.
User avatar
airsoftsoftwair
 
Posts: 2098
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: I search for a function "if an object exists"

Postby sinisrus » Sat May 20, 2017 9:38 am

ok nice thank you
and the "setpointer" for muiroyal Is it still possible with the latest update 1.5/1.6?
sinisrus
 
Posts: 185
Joined: Tue Apr 21, 2015 5:43 pm

Re: I search for a function "if an object exists"

Postby sinisrus » Tue May 23, 2017 2:02 pm

I need the function mui.HaveObject () to advance on my project it is possible to have a special version of muiroyal (os4 and os3) before the next update?

thank you in advance
sinisrus
 
Posts: 185
Joined: Tue Apr 21, 2015 5:43 pm

Re: I search for a function "if an object exists"

Postby airsoftsoftwair » Wed May 24, 2017 7:19 pm

Sorry, that's not possible but you can easily implement such a function yourself by querying an attribute every object supports, e.g. Notify.Version:

Code: Select all
Function HaveObject(x)
   ExitOnError(False)
   mui.Get(x, "version")
   b = (GetLastError() = #ERR_NONE)
   ExitOnError(True)
   Return(b)
EndFunction
User avatar
airsoftsoftwair
 
Posts: 2098
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: I search for a function "if an object exists"

Postby sinisrus » Thu May 25, 2017 10:28 am

Perfect for me, I test this

Very thank you :-)

I tested good wook very very thank :D
sinisrus
 
Posts: 185
Joined: Tue Apr 21, 2015 5:43 pm


Return to MUI Royale

Who is online

Users browsing this forum: No registered users and 1 guest

cron