Posted by Jhon in SWF Studio V3 on Jan 31 2008, 03:08 pm

Hello,

it would seam that this code works, but the width and height are not set to the console.


ssCore.Console.open({height:"250", width:"900", title:"MyProject"});


I am under Vista Ultimate edition 64-bit, using SWF Studio v3.5 Build 285


Posted by northcode in SWF Studio V3 on Jan 31 2008, 03:15 pm

You are trying to create a window that's too big. Width and height are supposed to be specified in characters, not pixels :rtfm:

You should be getting "CONSOLE_ERROR_BAD_SIZE" returned from that call. But for that you'd have to check a return code every now and then :evilgrin:


Posted by fruitbat in SWF Studio V3 on Aug 11 2008, 11:12 pm


QUOTE:
You are trying to create a window that's too big. Width and height are supposed to be specified in characters, not pixels :rtfm:

This has been bugging me for a long time. I've R'ed the FM and
a) it doesn't tell you (or rather, it only barely sort of implies) that it throws a sizing error if you exceed a maximum allowed value, and 
b) it doesn't explain how that value is determined.
I have a wide screen but am only able to open Console windows that are 80 characters or less in width, which is less than a third of my screen real estate (and that's only counting one monitor).

Console doesn't seem to have any trouble figuring out the correct max height. What's with width?


Posted by northcode in SWF Studio V3 on Aug 12 2008, 04:21 am

The example is bad because it's misleading (the guilty will be punished). I'll make sure that gets fixed so it looks more like a size given in characters instead of pixels.

If you don't pass in the width and height, SWF Studio calls the Windows GetConsoleScreenBufferInfo function behind the scenes to get the maximum extents for the width and height. It uses the dwMaximumWindowSize member of the CONSOLE_SCREEN_BUFFER_INFO struct. This is a COORD structure that contains the maximum size of the console window, in character columns and rows, given the current screen buffer size and font and the screen size.

We could have exposed a function to let you read that, but if all you want is the biggest possible console window then omitting the width and height parameters to ssCore.Console.open will do that.

QUOTE:
it doesn't tell you (or rather, it only barely sort of implies) that it throws a sizing error if you exceed a maximum allowedEvery ssCore function returns a result object with an attached Error object (directly or asynchronously via a callback function). If you ever suspect that something isn't workinig as expected then that's the first place you should look for a reason.


Posted by fruitbat in SWF Studio V3 on Aug 13 2008, 10:54 am

Thanks for the explanation. Maybe now I can describe the issue I'm having more clearly. What's I'm seeing is Console maxing out its width at 80 columns, no matter how big the screen is or what if anything I put in for the width parameter.

Height seems to be fine. Width is broken.


Posted by northcode in SWF Studio V3 on Aug 13 2008, 12:26 pm

Width is not "broken", 80 would seem to be the maximum value returned by GetConsoleScreenBufferInfo. I don't know why, you'll have to take that one up with Microsoft. It depends on the screen buffer size, the font size and the screen size but I haven't seen anything that clearly desribes the algorithm used to determine the maximum size, or even if there is one.


Posted by fruitbat in SWF Studio V3 on Aug 13 2008, 12:32 pm

Okay, thanks.


Posted by fruitbat in SWF Studio V3 on Sep 10 2008, 06:03 pm

For what it's worth, changing the console properties directly through Windows seems to work for this issue.


  •  click the upper left icon in the Console window
  •  go to Properties
  •  change Screen Buffer Size width and/or Windows Size width
  •  click OK
  •  select "Save properties for future windows with same title"
  •  click OK


Posted by northcode in SWF Studio V3 on Sep 10 2008, 08:45 pm

If you can set it manually then there may be a way to do it programmatically as well. I'll do a little more digging and see what I can come up with.