Vyzor, UI Manager for Mudlet

Share your scripts and packages with other Mudlet users.
User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

Ah. Alright. I understand now. That's a bit more complicated than I thought it would be, but it will work.

As a result, I've created a global table called _Frames and am maintaining it like you said. Pretty neat actually. Had no idea you could store the Vyzor functions in a table like that. Neato! Thank you Oneymus, chris and Vadi. Very helpful and most appreciated.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

The Vyzor Guide mentions this about the VyzorLoadEvent.
This is raised after Mudlet has loaded all of Vyzor's modules. It should be used to initializing your GUI, as it ensures all parts of Vyzor as ready to go.
But it seems Vyzor tries to raise the event before Mudlet has loaded the Lua modules and thus, no event is raised.
Image

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Vadi »

The messages are a bit off, the OK's and INFOs are actually done before Vyzor and all your scripts - the echoes just come after.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

Nothing on my profile aside from the latest version of Vyzor and the following event handler named Check for VyzorLoadEvent:
Code: [show] | [select all] lua
function Check()
   echo("VyzorLoadEvent raised")
end
But nothing happens unless I raise the event manually. Looking at the Vyzor script, it should be working just fine. I haven't had any luck with the VyzorLoadEvent in the past so I've never utilized it. But it is the proper way to create a GUI with the Vyzor framework so I'd like to get it working.

User avatar
Oneymus
Posts: 321
Joined: Thu Sep 17, 2009 5:24 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Oneymus »

So, it may be a little strange, but you have to put your VyzorLoadEvent handler -above- the Vyzor script. This is because neither Mudlet nor Lua know about the event or the function, respectively.

Scripts are loaded top-to-bottom when Mudlet loads a profile; you need to "register" the handler before the event is raised so Mudlet knows what Lua function to call.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Vadi »

You could use a trick to bypass the order:

tempTimer(0, [[raiseEvent("whatever]])

It'll delay it until peoples scripts are loaded.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

So registering the event handler before Vyzor didn't seem to work. But I did throw in that tempTimer() trick in place of when Vyzor raises the VyzorLoadEvent and it worked like a charm. Do you think you could include that in Vyzor by default Oneymus? Very nifty.

almostid
Posts: 2
Joined: Sat Mar 23, 2013 9:04 pm

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by almostid »

I can't seem to get Vyzor to install correctly, I am using ubuntu installed the xml file in mudlet like any other but it gets stuck at loading

Vyzor: Loading modules...

In the scripts tab the vyzor group has 1 item 'Vyzor'
I uncommented the first line
-- Uncomment this out for quick reloading of Vyzor files.
-- expandAlias("U")

and this happens
2784h, 2506m ex-1.0%- 22:47:01:347U
Vyzor: Unloading modules...
Vyzor: Unloaded all modules.
Vyzor: Loading modules...
U
Vyzor: Unloading modules...
Vyzor: Unloaded all modules.
Vyzor: Loading modules...

any ideas as to what I am doing wrong?

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

Make sure you installed vyzor.mpackage and not vyzor.xml

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Vyzor, UI Manager for Mudlet [Beta?]

Post by Akaya »

If I apply Vyzor.Hover() to a Frame, the Frame removes any Vyzor.Font() component or reverts back to the default size and style.

Post Reply