Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 6th, 2024, 9:26 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 3:32 pm 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
Hi all,

What is the best way to handle this .( desktop Item ) Basically i have a text block that i want to have a value and when that txt block is dropped ( in a drop frame ) i want the value to show up in another txt frame . Now that txt frame will have to be able to accept many values from the ( up to 4 ) dropped items...


I though in older versions of Opus we could just have the item store data with in itself ( attack a variable ), then i could create an action saying once item dropped SHOW contents of variable 1 in Text frame 2 ... cant seem to find this in newer OPUS versions or i might be dreaming again LOL...


Al

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


For this message Al Barnes has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 4:58 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Does the text block that your dragging contain a static or dynamic value?

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 5:32 pm 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
mackavi wrote:
Does the text block that your dragging contain a static or dynamic value?

Mack


It would need to be a system wide value ( so it could be used for all 7 days, i plan to make a page for each day ) BUT if need be i could add it for every page....

Hi Mack

Your going to laugh but here is what i want to achieve. My wife is after me to eat better, do to our different tastes she forced me to sit down at the table and work on a chart ( it sucked )( constantly writing and erasing ) after the first 30 seconds all i heard was " Blah blah blah " :wink: . So that and what would work great would be a web based page where we could drag and drop items in to a box .

But that was not enough , i wanted the meal choices to also carry information Ex: recipe\Grocery list items that could be added to a file to print for the trip to collect the items...... Now seeing as some of the meal could have 2 or 3 choices i need the Data area to be available to have data added or removed as dragged items get moved in and out..... It could become a Game, we could have a timer and when the time runs out , that's the meal :lol:

The project would be great as a web Page but i felt maybe i was being to demanding and re-thought it to a desktop project...

Web would be awesome, but desktop is fine as well. we could have it so choices are emailed back and forth . Anyways Mack as you can see 1 little idea snowballed and when i mentioned to the wife that it might be doable, she LOVED the idea.... She also mentioned many other of her Female would love the idea.

So that's where i am at Mack , the question is -> Mack and Cheese OR Hot Dogs ......... have to make that dragable :D


hey Mack was I right, could we not post a value from a variable before to a text block... ? and couldn't we attach a variable to a item ( button/txt block )?

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


For this message Al Barnes has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 8:04 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Sorry Al,

You're losing me.

Are you trying to assign a value to an actual text box - rather than just insert a variable or plain text?

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 8:38 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Al, I guess your mother never told you to "not play with your food". So in your game, how do you keep score? :)

I'm with Mack --- what do the values represent? And from your original post, you said "...up to 4 draggable objects." Whereas the latest post suggests an expanding number of choices, and combinations??

I'm interpreting the purpose as meal-planning (and not nutrition tracking nor recipe selections). IMO, the simplest approach would either be a mock-up restaurant menu where you click to select (incl. images if desired). Another simple approach is to use Listboxes for various main courses, side dishes, etc. -- a veritable 'configurator'.

As for Drag & Drop in Opus, I labored over it in the past.... how to identify which object dropped. It is something that is not automatically surfaced in Opus, and I had to get help here and write some very involved scripts (for multiple draggable objs and multiple drop-zones). Per Macks suggestions years ago, it was useful to use Collision detection triggers/actions or in scripting use the IsIntersecting after appropriate event/trigger.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 9:16 pm 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
HI Godlike and Mack

Maybe that's it , the drag and drop is a bad way of doing this....


What i wanted was to have it so that the selected meal would stay displayed and also display the ingredients needed so i could build a grocery list to Print or what ever.

So lets say i chose "Lasagna" well then the Name Lasagna would be displayed and Ingredients/Recipe would be displayed and be printable OR added to a master file to build a grocery list.....

And Godlike i have to play with my Food :shock: some of those bland meals my wife cooks have nothing else to off :lol:

Already you guys have me thinking..... is there a tutorial on building drop down menus ?

Al
Thanks Guys

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


For this message Al Barnes has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 10:00 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Al,
I'm not trying to say Drag/Drop is a bad idea, but that in my experience dealing with many draggable and trying to do something flexible with that is a challenge. For example, if you use D&D in a Quiz, you create it to score one correct answer or maybe some weighted criteria for correctness. And quizzes typically score numerically. BTW, by 'many draggable' I mean more than 7 or 8, but even that can be logically programmed of course... the complexity expands with multiple dropzones. You also need to plan for dragging back out of the DZ and thus reversing actions.

Hence, my mild suggestion to look at Listbox for multiple-choice. Also, Radio Button Groups are useful for either/or choices.

For some examples of Listboxes, I think DW included some basic sample Pubs these last years and may also have some tutorials on their site for download. You can search this forum for various threads: looking for 'listbox' and some other keyword:
listbox menu
listbox lookup
listbox look-up
listbox dropdown

etc.

There are some great and powerful things you can do with Listbox as a LOOKUP.
Remember that the listbox object can have variable attached to it for INDEX of the Selected item, and also for the Value or Label String of the Selected line.

Here's a Hint for a possible approach:
Create a Multiframe object with something like 10 Frames (each Frame having a Text Object in it). You simple type or copy your Recipe into one of the Frame/Text_Obj.
>>>>> Now, making a choice in a Listbox... that listbox can have an On-click trigger, and the Action would be "Go To Frame" in the MultiFrame. (using matching Indexes)

Note: The above introduces some challenges for maintaining and adding Recipes and corresponding List-item (but some Opusscripting can easily help for sorting and manipulating lists during Play/runtime).

= = = = = = =
As for eventually printing your meal ingredients, recipe, or whatever.... see Brendan Knifton's plan for printing at runtime. I think you could even included images.
viewtopic.php?f=4&t=442&hilit=print+page+html
Quote:
This example allow you to create a html file from data inputted by the end user. The resulting html file then can be loaded into a browser object and printed.
I should mention, if you set-up your Frame in that Multiframe with proper layout, the User may be able to directly print-out just that object (and its contents) -- albeit as an image printed.

BTW, you can still use Drag & Drop to have User makes selections --- to then bring-up a MF Frame or other combination of values and objects. It is just a matter of how you choose to deal with the complexity.

Goodluck.
Lar

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 19th, 2013, 10:22 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
One man's challenge is another man's fun!

If it was local, I'd create an INI file with the properties you needed - name, ingredients, path to image, dietary data. Then I'd read that INI file in and create a clone object for each item and using the 'this' keyword attach all those properties to the clone object.

That way when you interact with the clone (mouse over, drag / drop) you get access to all the data for the food item.

The whole thing is dynamic - just add to the INI file as you want more foods.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 20th, 2013, 12:57 am 
Offline

Joined: February 12th, 2005, 5:27 pm
Posts: 177
Location: Canada
Opus: Pro
OS: Win7
Thanks Guys you have given me many idea's and concepts to work from . Over the next week i will start researching the Drop down menu stuff ( curious ) and i will also view Mack's. I could be as simple as creating txt boxes and hide them and have the show when dragged content is placed..... I love this stuff :wink:

_________________
-------------------------------------------------------
Win7 AMD +5000 Dual Core with 4 gig ram Geforce 9600 OPUS V7.05 Novice to Scripts/willing to learn , Mp3 Files must be 128kb


For this message Al Barnes has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Best way to handle Drag and drop with a value
PostPosted: March 25th, 2013, 10:11 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Al,

I came across another Thread here where Denny devised a Pub also for recipes. Pretty cool, and quite refined IMO.
viewtopic.php?f=4&t=4243&hilit=open+database

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group