I search for a function "if an object exists"

Discuss GUI programming with the MUI Royale plugin here
Post Reply
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

I search for a function "if an object exists"

Post by sinisrus »

Hello,

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

thank you
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

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.
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

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

Post by sinisrus »

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

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

Post by sinisrus »

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
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

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
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

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

Post by sinisrus »

Perfect for me, I test this

Very thank you :-)

I tested good wook very very thank :D
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Code: Select all

- New: Added mui.HaveObject(); this allows you to check whether the specified MUI object exists
Post Reply