Group Abstract Group Abstract

Message Boards Message Boards

[WSG21] Daily study group on creating custom user interfaces

87 Replies
Posted 4 years ago

Rohit, Thanks. Gerry

POSTED BY: Gerald Dorfman
Posted 4 years ago
POSTED BY: Gerald Dorfman
Posted 4 years ago

Hi Gerald,

You were close.

Manipulate[
 Grid[
  {{Style["a = " <> ToString@a, 20]},
   {ContourPlot3D[x^2 + y^2 + a z^3 == 1, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, 
     Mesh -> None, 
     ImageSize -> Medium]}
   }],
 {{a, -2, Style["a", 16]}, -2, 2}]

Also increased the size of the label for the control.

POSTED BY: Rohit Namjoshi
POSTED BY: Pål Lillevold
POSTED BY: John Burgers
POSTED BY: John Burgers

TimeConstrained seems not to work when implemented in the Button functionality.

  • Correctly understood?
  • Is there a work around?

Thank you in advance and best regards Pål L

POSTED BY: Pål Lillevold
POSTED BY: Jayanta Phadikar

Thank you so much, Vincent!

POSTED BY: Pål Lillevold
Posted 4 years ago
POSTED BY: Tom Blanton
POSTED BY: Andreas Rudolph
POSTED BY: vincent feng
Posted 4 years ago
POSTED BY: Tom Blanton
POSTED BY: vincent feng
POSTED BY: Cassidy Hinkle

Was a recording made of today's (Fri, 24 Sep) presentation?

POSTED BY: Matthew Heaney
Posted 4 years ago
POSTED BY: Doug Beveridge

Hi Doug, All the sessions from the series have been publish for review. You can go to the series landing page and choose which you'd like to review. You'll be taken to the session page and can hit the play button to begin watching. Please let us know if you have further questions.

POSTED BY: Cassidy Hinkle

Week 3 Recap, Live UI Development and Mini Projects Solutions is not available.

Posted 4 years ago
POSTED BY: Gerald Dorfman

We will be distributing the solutions to the projects in Session 14.

POSTED BY: Jayanta Phadikar
Posted 4 years ago

Hi Gerald,

I see a couple of typos. Dyanmic[input] should be Dynamic[input], and BaseStyle -> BackGround -> White should be BaseStyle -> Background -> White

POSTED BY: Rohit Namjoshi

Attendees in the daily study group had asked about the palette used to delete outputs during presentation. DeleteAllOutputPalette is now present in the Wolfram Function Repository. https://resources.wolframcloud.com/FunctionRepository/resources/DeleteAllOutputPalette/

POSTED BY: Kunal Khadke
Posted 4 years ago

PaneSelector evaluates its arguments before the selector is rendered, they are not re-evaluated when a selection is made. e.g. the random values do not change

DynamicModule[{x = 1}, 
 Column[{SetterBar[Dynamic[x], {"Don't press this", 1, 2, 100, "Hi there"}], 
   PaneSelector[{"Don't press this" -> "I said DONT PRESS !!!", 
     1 -> RandomInteger[10], 2 -> RandomReal[], 100 -> "You Pressed One Hundred", 
     "Hi there" -> "What is your name ?"}, Dynamic[x]]}]]
POSTED BY: Rohit Namjoshi

Use the second argument of Dynamic:

DynamicModule[{x = 1},
 Column[
  {
   SetterBar[
    Dynamic[x, 
     If[# == "Don't press this", Speak["I said DONT PRESS !!!"]; 
       x = #, x = #] &],
    {"Don't press this", 1, 2, 100, "Hi there"}],
   PaneSelector[
    {"Don't press this" -> "", 1 -> "One", 2 -> "Two", 
     100 -> "You Pressed One Hundred", 
     "Hi there" -> "What is your name ?"}, Dynamic[x]
    ]
   }
  ]
 ]
POSTED BY: Jayanta Phadikar

Question: Today you pointed out that ImageSize -> Automatic helps speed up slow interfaces. Could you please explain why?

POSTED BY: Zbigniew Kabala
POSTED BY: Jayanta Phadikar
POSTED BY: Jayanta Phadikar
Posted 4 years ago

Thanks, Jayanta. Very helpful. Looking forward to Session 10.

POSTED BY: Tom Blanton
Posted 4 years ago

I would like to develop UI's that clients can use with Wolfram Player. From the class yesterday it seems that DynamicModule could be used in this way. Is this correct?

ETA: I would like to keep my functions proprietary, i.e. the client would not be able to see the code.

POSTED BY: Tom Blanton

Yes DynamicModule is in general supported in the Wolfram Player. Please see the difference between the Free Player and the Player Pro/Enterprise CDF though, for a comparison of all the supported features.

We will discuss encoding of packages, making the functions ReadProtected etc. for securing the code in Session 10 - Deployment. If your interface is small enough, you could deploy the interface and need not keep code in any separate package. Once again, more about deployment practices are coming in Session 10.

POSTED BY: Jayanta Phadikar
Posted 4 years ago
POSTED BY: Rohit Namjoshi
POSTED BY: Pål Lillevold
Posted 4 years ago
POSTED BY: Doug Beveridge
POSTED BY: Andreas Rudolph
Posted 4 years ago

I am trying, without much success, to set a local DynamicModule Variable (x) when a global variable (y) is changed :

y = 1 ;

DynamicModule[{x},
 Dynamic[y; Print["called"]; x=100, TrackedSymbols :> {y}]; 
 Dynamic@x,
 Initialization :> (x = 3*y)]

Where am I going wrong?

POSTED BY: jeremy kirton
Posted 4 years ago
POSTED BY: Updating Name
Posted 4 years ago
POSTED BY: Gerrie Shults
POSTED BY: Jayanta Phadikar

Is it permissible to Overlay a control onto a graphic?

For the "Car Game" I created a background image as a graphic object and the "start"/"Stop" controller

background = Graphic[...] control = ... which toggles as in the car game demo,

But the control can't be used when these are packaged together using

Overlay[{
  background,
  control
  }, Alignment -> {Center, Bottom}]

Thanks.

POSTED BY: John Burgers

Yes, it is possible by using the third argument of Overlay.

Here is an example from the documentation (ref/Overlay#53834658):

Overlay[{Slider2D[], Graphics[{Opacity[.2], Disk[]}]}, All, 1]
POSTED BY: Jayanta Phadikar
POSTED BY: John Burgers

Yes it seems that the controls from only one layer can be activated. You can however use Row/Column/Grid in that layer for keeping multiple controls.

POSTED BY: Jayanta Phadikar

Where should I put the Dynamic to control the appearence or not of the frame in this toy manipulate example:

Manipulate[
 x,
 {x, 0, 1},
 {{frmd, False}, {True, False}},
 Paneled -> frmd
 ]
POSTED BY: Jayanta Phadikar
Posted 4 years ago
POSTED BY: Raymond Low

How would you set up two columns where the left column is text and the right column is Mathematica commands such as In/Out. This is format was used by S. Wolfram in his Mathematica Book 4th edition.

POSTED BY: Charles Glover
Posted 4 years ago
POSTED BY: Rohit Namjoshi

Thanks - I'll check it out

POSTED BY: Charles Glover

Jayanta, Rohit, Many thanks for your help.

Jorge O

Posted 4 years ago

Jorge,

I believe the differences you are seeing are because the visual appearance of controls matches the default appearance of controls in the underlying operating system. The one on the left is Mac OS, the one on the right is Windows. I don't think there is an easy way to make them look identical.

POSTED BY: Rohit Namjoshi
Attachment

Attachments:
POSTED BY: Jayanta Phadikar

In few examples from the tutorials in Windows 10 I have a couple of appearence issues: For example in the figure below enter image description here

The controls are truncated.

In the next simple command the x symbol at the left appears very small. enter image description here

Both examples are at 100% (zoom) magnification level. Obviously there is a matter of scaling in a laptop screen. All the values at the preferences are in the default values.

Posted 4 years ago
POSTED BY: Rohit Namjoshi
Posted 4 years ago
POSTED BY: Rohit Namjoshi
Posted 4 years ago
POSTED BY: Updating Name
POSTED BY: Jayanta Phadikar
Posted 4 years ago
POSTED BY: Gerrie Shults
Posted 4 years ago
POSTED BY: Rohit Namjoshi
Posted 4 years ago
POSTED BY: Gerrie Shults
Posted 4 years ago
POSTED BY: Gerrie Shults

Is it safe to try the quiz now? Is it grading correctly?

POSTED BY: James Choi

I am sorry, could someone post the link to the quiz? I can not find it on the group. Thank you and sorry for the added noise!

POSTED BY: Rui Alves
Posted 4 years ago
POSTED BY: Gerald Dorfman
Posted 4 years ago

It does not work because of a typo. Delimiter, not Delimeter.

POSTED BY: Rohit Namjoshi
POSTED BY: Jayanta Phadikar
Posted 4 years ago
POSTED BY: Avery Kramer

Thank you everyone for your enthusiastic participation in this week's sessions. I hope that you have been enjoying and finding the sessions helpful.

In this week, we covered some fundamental concepts of dynamics and Manipulate.

In the next week, we will discuss more about certain pragmatic concepts related to the development of User Interfaces and look at several User Interface examples.

Our apologies for few things here and there not working properly in the notebooks. We are making the corrections and will make an updated set of notebooks available to you at the end of the series.

POSTED BY: Jayanta Phadikar
Posted 4 years ago

Today's quiz is a disaster. My answers to questions 2, 5, 9 and 10 are being ignored. I can change my answers to any of these and my score remains unchanged.

POSTED BY: Gerrie Shults
Posted 4 years ago
POSTED BY: Gerrie Shults
POSTED BY: Timothy Ewing
Posted 4 years ago

Hi Gerrie,

Yes, I agree, grading is messed up on questions 2, 5, 9, 10.

POSTED BY: Rohit Namjoshi
POSTED BY: Andreas Rudolph

Hi Everyone,

Just wanted to confirm Quiz 1 should be working as expected. Our apologies for the issues you faced with the quiz last week.

Also we'd like to request that you not post the link to the quizzes here in the public forum. We've created the quizzes specifically for our study group attendees. But we are happy to discuss any questions you may have about the quizzes, here.

Thank you, Abrita

Posted 4 years ago
POSTED BY: Tom Blanton
POSTED BY: Timothy Ewing

The approach suggested by Mr. Choi is correct.

The standalone version of the built-in LAB color palette can be seen using:

CellPrint[FrontEndResource["LABColorValueSelector"]]

This particular palette works by replacing the selection, and is thus hard to integrate with a Manipulate.

It is possible to emulate the built-in LAB color setter using top level code, but that would require some work.

POSTED BY: Jayanta Phadikar
POSTED BY: James Choi

I am wondering is there a way to vary what type of color setter is presented to the user with the Manipulate function. For example, is it possible to use a LAB Color setter instead of the default color selector in the Manipulate function? enter image description here

POSTED BY: Peter Burbery
POSTED BY: Lou D'Andria
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard