ID:271364
 
I have setup two browser windows and a label.
How can I access those and modify them?
(ex; add stuff to the browser window, modify the label's text..)
winset()
In response to Xx Dark Wizard xX
Could you please explain how to use winset()?
In response to Flame Sage
//winset(whoYouWantThisToEffect, "windowYouWantChanged", "variable=value")
winset(src, "information", "left=statswindow;") //This will show the "statswindow" to show on your "information" child.


That's my basic understanding of it. I'm not sure if you can actually change labels text while the game is actually running, but someone else might.
In response to Smoko
I have this browser window, and I want to be able to display HTML in it, the browser window name is "windowA".
So how would I do that?
I tried...
winset(src,"windowA","Hello world!")

but that didn't work...
In response to Flame Sage
I don't know how to control what output goes where, sorry. I should have mentioned that in my first post.
In response to Flame Sage
It's not supported yet. The current implementation may not be final so I wouldn't advise putting posts regarding it in Dev How-To. It could really confuse someone looking up winset() using the forum search later on if the release version doesn't work the way it does now.
If you insist on using the beta then you should probably ask your questions somewhere like wiz_chat.
In response to DarkView
I found out how! :)
world<<output("Hello World!","object_name")
In response to Flame Sage
Flame Sage wrote:
I have this browser window, and I want to be able to display HTML in it, the browser window name is "windowA".
So how would I do that?
I tried...
winset(src,"windowA","Hello world!")

but that didn't work...

To use the browser is the same as using output, world<<output("BYOND 4.0","browser1005")
In response to DarkView
wiz_chat is essentially dead. We all up-and-moved over to Hiead's Chatty program.
In response to Popisfizzy
Popisfizzy wrote:
wiz_chat is essentially dead. We all up-and-moved over to Hiead's Chatty program.
That's... nice to know?
In response to Flame Sage
Flame Sage wrote:
I found out how! :)

Obviously you missed the part of DarkView's post where it said "It could really confuse someone looking up winset() using the forum search later on if the release version doesn't work the way it does now." Way to go.

As for asking about a private beta on the public forums, that's just nuts. The very reason why it's private, and the very thing that Tom and the like don't want happening is to stop discussion and confusion coming from those that they did not deem as testers. He has said that he doesn't mind if the (hopefully few) people that have it (it seems like it's spreading, ungh) tinker with it, but he doesn't want it to complicate anything on his end or on the development of 4.0. Now if a small sub-community were to build up in worship of the belief that 'how' ==
world<<output("Hello World!","object_name")

Tom may be less inclined to propose a newer structure that may even be better. Or, perhaps this output() totally changes, and then the little community of greedy 4.0 snatchers (I'm tired, I did try to describe it better) protests it because it breaks compatibility with their preemptive 4.0 code. That can't help motivate the BYOND Staff's 4.0 development. In fact, I wonder if the fact that all of you are spreading this private beta like wildfire isn't already de-motivation enough.

Hiead
In response to Flame Sage
Obviously he didn't know this, or else he wouldn't have directed it there. See, just because you started this thread doesn't mean I'm replying directly to you. Under normal circumstances, the individual I'm replying to will be the person with the parent post. You have the grandparent post, which means moot.
In response to Hiead
From what I can see, they don't really care about us using and working with the Beta. As long as bugs aren't reported, and we know what we see, is what we currently have.

We all know that things in the official release could change and break our code, but we are also willing to take that risk.
You must use the win* procs.

winset(client,object,variable)
Args:
client: the client to affect.
object: the windowid.objectid to affect (or just objectid if the object is 100% unique)
variable: the variable to change.
Example usage:
You have a label on the default window which has an id of "label1"
for(var/client/C) winset(C,"default.label1","text=Hello, world!")

This sets the text of label1 in your default window to "Hello, world!"

winclone(client,window1,window2)
Args:
client: the client to affect.
window1: the name of the window you want to clone.
window2: the unique id of the window you've cloned.
Example usage:
winclone(usr.client,"default","default2")


winshow(client,window)
Args:
client: the client to affect.
window: the windowid to toggle.

winget(client,object,variable)
Works similar to winset().

Example usage:
mob/verb/window_test()
if( winget(usr.client,"default","is-visible") =="false")
winshow(usr.client,"default")
else
usr<<"This window is already open!"


Note: This may or may not be subject to change, given the fact you're running a future release of BYOND. Please, only use this for "oh cool it works" purposes. Do not make a game using this just yet. Don't release 4.0. Don't mess up, please.