Old 3rd February 2003, 23:40   #1
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
Maki and Wasabi:StandardFrame

this code keeps giving me a null object called guru:

code:

Group g = getContainer( "bla" ).getLayout("normal");
if( g != NULL )
{
GuiObject o = g.findObject("mainFrame");

if( o != NULL )
{
o.setXMLParam( "padtitleright", "16" );
}
}



sorry bout the formatting, just a quick cut and paste. And the container and layout and names are right. Here is the XML exerpt.

code:

<Wasabi:StandardFrame:NoStatus
id="mainFrame"
x="0" y="0" w="0" h="0" relatw="1" relath="1"
content="bla.content.group"
padtitleleft="0"
padtitleright="0"
/>



Why doesn't that work? Hrm.....


Also, how can i prevent the frame the addon creates to NOT drag every other docked window with it when it's been docked with other windows. It's priority is like the main window. Know what I mean? Thanx .
lunarboy1 is offline   Reply With Quote
Old 3rd February 2003, 23:47   #2
iPlayTheSpoons
Major Dude
 
iPlayTheSpoons's Avatar
 
Join Date: Aug 2001
Location: SJSU
Posts: 1,030
Send a message via AIM to iPlayTheSpoons
your code is wierd

code:

Group g = getContainer( "bla" ).getLayout("normal");


a group cant equal a layout?!

and im not sure how call-able those frames are...
iPlayTheSpoons is offline   Reply With Quote
Old 4th February 2003, 21:42   #3
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
layouts are now groups. Straight from std.mi:

code:

extern class @{60906D4E-537E-482e-B004-CC9461885672}@ Group &Layout;

lunarboy1 is offline   Reply With Quote
Old 4th February 2003, 22:47   #4
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
changing the type of the g var to Layout doesn't change anything. Still null object called guru.
lunarboy1 is offline   Reply With Quote
Old 4th February 2003, 23:23   #5
iPlayTheSpoons
Major Dude
 
iPlayTheSpoons's Avatar
 
Join Date: Aug 2001
Location: SJSU
Posts: 1,030
Send a message via AIM to iPlayTheSpoons
then its probably trying to find the object like you are...like i said, i dont know about the call-ability of those frames...whatre you trying to do exactly? maybe i could think of a better way
iPlayTheSpoons is offline   Reply With Quote
Old 4th February 2003, 23:51   #6
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
Hmm, you need to know what object is coming up NULL. I could be wrong, but I get the strange feeling it may be the container, which is the only object you aren't doing a Null-check on. Break that line in two, and maybe use a few msgboxes verifying what lines are executed and where the guru pops up, in case it isn't the container.

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 5th February 2003, 00:17   #7
thepyr0x
Major Dude
 
thepyr0x's Avatar
 
Join Date: Oct 2001
Location: At my house in a city in Canada
Posts: 1,336
or you could use Rhinotrip's guru debugging thingy
I personally use that and a lot of System.DebugString with a console program when I get guru meditations

thepyr0x is offline   Reply With Quote
Old 5th February 2003, 01:55   #8
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
yea.. unfortunatly his debug thingie won't work because the guru's number is

001C.FFFF0056

The FFFF won't point to anything on the debug symbol table.

I'll add a bunch of messageboxes and have fun with those .
lunarboy1 is offline   Reply With Quote
Old 5th February 2003, 02:01   #9
thepyr0x
Major Dude
 
thepyr0x's Avatar
 
Join Date: Oct 2001
Location: At my house in a city in Canada
Posts: 1,336
you could try a console thingie
that's already solved a few of my problems.....watching the console go as the skin loaded cuz Winamp sometimes sends out console messages when stuff goes wrong

thepyr0x is offline   Reply With Quote
Old 5th February 2003, 02:16   #10
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
Shit... it is the container which is failing. Don't know why though. I can get the container fine, but when i try to call something on it it fails. Son of a biatch.

[edit] where are you getting this console, the one the francis has at his genghis site doesn't work.[/edit]
lunarboy1 is offline   Reply With Quote
Old 5th February 2003, 03:04   #11
thepyr0x
Major Dude
 
thepyr0x's Avatar
 
Join Date: Oct 2001
Location: At my house in a city in Canada
Posts: 1,336
It's a program called DebugView that you can get from www.sysinternals.com. It's not made specifically for WA3, so you might see other console messages in there too...but it has been more than ample for me (And debugString is a lot easier to handle than message boxes, at least to me)

thepyr0x is offline   Reply With Quote
Old 5th February 2003, 03:35   #12
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
Where is the script located relative to the container in the xml? Outside of it?

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 5th February 2003, 21:22   #13
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
In a groupdef in the same container.
lunarboy1 is offline   Reply With Quote
Old 5th February 2003, 21:32   #14
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
Quote:
Originally posted by thepyr0x
It's a program called DebugView that you can get from www.sysinternals.com. It's not made specifically for WA3, so you might see other console messages in there too...but it has been more than ample for me (And debugString is a lot easier to handle than message boxes, at least to me)
What a kick ass program.

This is the DebugOutput:

findWindow: window not found by id

So I guess Wa is having problems with the id searching for containers.

I guess it is possible that i could use getScriptGroup(); but then i'd need two scripts and things would be much much tougher on me.

lunarboy1 is offline   Reply With Quote
Old 5th February 2003, 21:51   #15
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
If you put a script in a groupdef, it is run when the group is instantiated, which is, programmatically, at the point the layout tag is closed; but at that point, the container isn't closed. So either:
A) Move the script outside of the container, in the <scripts></scripts> section.
or
B) Use getscriptgroup.

Why would you need two scripts? What is the ultimate goal you're seeking? Discussing that might help zero in on the best way to attack the problem.

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 5th February 2003, 21:56   #16
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
i have groupdef which is called from the <Wasabi:StandardFrame tag in this param:

content="bla.content.group"

so that explains why it isn't working (your "closing of tags" explanation).

Could I just set a timer to like 1.5 to 2 seconds then when the timer stops instantiate everything then? By then the xml reader will be done and things may be called ... right?
lunarboy1 is offline   Reply With Quote
Old 5th February 2003, 23:41   #17
Hollow
Major Dude
 
Hollow's Avatar
 
Join Date: Oct 2001
Location: Baker Lab, Ithaca NY
Posts: 1,128
Send a message via AIM to Hollow
Bad Idea. (notice the caps?)

Thats a horrible hack. There has to be a better way.

For example: Say your doing something processor intensive. Doesn't matter what. The Group doesn't get instantiated within the time (because winamp hasn't had time to process everything yet) but that time is going to try to respond in two seconds anyway. Regardless. Also you need to take differing computer speeds into account.

The moon is made of cheese.
Oh for some tasty moon cheese.
www.redtetrahedron.org
Hollow is offline   Reply With Quote
Old 6th February 2003, 05:10   #18
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
yea i've been messing with it a lot. As of now, I don't think i'll be able to continue further because code has gotten extremely messy. I'll need to do a big rewrite. Only when I don't have to use getScriptGroup() and can use getCont().getLayout().getGroupdef then will things work, because i'd need two different scripts now and it causes major problems. Ah well. Something to look forward to i guess . It was working great for its intended purpose, I wasjsut trying to mess with a custom check box script i found from energy3. Modified it, and I also had an EditBox elsewhere i needed to get a hold of which was also in a groupdef. ARG!
lunarboy1 is offline   Reply With Quote
Old 6th February 2003, 09:38   #19
Bizzeh
Forum Pirate
Beta Team
 
Bizzeh's Avatar
 
Join Date: Oct 2001
Posts: 2,032
use getScriptGroup() and put the script inside the frame layout

easyst way to do it realy
Bizzeh is offline   Reply With Quote
Old 6th February 2003, 23:07   #20
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
yea but the script can't be run from two seperate places then. Damnation. I still would need access to two differnt groupdefs othwise things get quite hairy code wise.
lunarboy1 is offline   Reply With Quote
Old 6th February 2003, 23:11   #21
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
What is the goal? There's still a few techniques to try, but I need to know what all this is supposed to be doing to be able to make appropriate suggestions. What is unique about the script that makes using getScriptGroup an unusuable solution?

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 7th February 2003, 22:08   #22
lunarboy1
Forum King
 
lunarboy1's Avatar
 
Join Date: Dec 2000
Location: Somewhere, USA
Posts: 2,233
Like i said, I'm using the custom chek box XUI idea from energy^3 and i need directy access to the elements of the XUI to make it work.

I also need access to manage some layers on the frame itself as well as an EditBox.

The point of the script is that it is a "Song Censorer". Basically my computer is in the middle of the basement. I don't have the most appropriate songs for the rest of my family to hear. So if I leave the computer for a little ammount of time "bad" songs could play. When I just turn the script on, it checks if the song going to play has been "flagged", then it skips it and so on.

The ideal way I had for this was to have a List of songs, and when it is activated then it would go through the playlists and disable playback for the bad songs. But I thought that would have to be a wac, and I'm afraid of those. I can handle Maki quite well, just my C++ background isn't big enough for wacs.

hope that helps gonzo.

(yes i could just make a "clean" playlist and a "bad" one but I frequently add songs and I would have to maintain multiple clean lists of my songs.)
lunarboy1 is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump