Asked by:
New Feature Idea - Shapes.AddSomething(img, "Hide")

General discussion
-
Lots of SB coders run into the issue of screen flicker when they have no choice but to Add Shapes mid way through their program.
I wonder if it would be possible to and consistent with the "keep it simple" tenet to include an optional parameter to the Shapes.AddImage(img, "Hide") objects (including rectangles etc).
If possible I think on balance this would add a lot of versatility to the Shapes object and with the parameter being optional would not add any complexity to SB.
Thoughts?
Friday, June 19, 2015 6:46 PM
All replies
-
I think this is a simple solution to a common problem and a good idea.
Maybe another would be that the shape is initally positioned off screen, so effectively hidden unttil moved into place - but for beginners this may be odd to add a shape and not see it.
Discussion?
Friday, June 19, 2015 7:02 PM -
I think we need the left and top by all object. By controle.addButton(caption, left, top) ist this implementated. So we can placed all object outsite the window. No problem for beginners. No flicker efects. The same syntax. Bad is the new syntax.
Best Regards Martin
- Edited by martmen Friday, June 19, 2015 8:06 PM
Friday, June 19, 2015 8:05 PM -
Doesn't the optional part of the parameter dilute the distraction to a beginner?
This might also initially rob beginners of the feature and allow them to discover it in their own time.
A candidate tenet of SB? Encourage learning by progression.
I've recently been trying to discover if optional parameters had a merit all of their own.
- Edited by Jibba j Friday, June 19, 2015 8:32 PM
Friday, June 19, 2015 8:19 PM -
@ about the: issue of screen flicker
Here are all the ways listed to avoid flickering when adding shapes i was aware of:
-> see Random numbers (scroll down until you see the yellow smiley)
Maybe anyone has some more ways to do it ... ??
- Edited by Pappa LapubEditor Friday, June 19, 2015 9:42 PM
Friday, June 19, 2015 9:40 PMAnswerer -
I like the idea, but not the implementation suggestions. For beginners, overloaded operations would be hard to follow (why are there two versions? and why does one have a second parameter?). And while I would personally love having the shapes created off screen, it would again be a stumbling block for beginners (where is the shape? I just added it and it is not showing).
I would suggest a new property - HideAtStart
It would be false by default, so newbies could see their creations without having to dig into the details of implementation or learn esoteric parameters.
When set to true, newly created shapes would automatically have their hide properties set, as if HideShape() was called on them just after creation.
No flicker. No confusion.
Saturday, June 20, 2015 3:07 AMAnswerer -
I added this idea to
Thanks, Jibba Jabba.
Nonki Takahashi
Friday, June 26, 2015 3:36 AM