Functions

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 12:41 pm

Hello,
im new in here and im sorry if my English is a little bit horrible.

first of all in my application there is fields with a lot of dates, each date is responsible for another things.
the date is days and months.so i dont know how to do that i can choose different dates for different field except of make a copy of 31 buttons that each of them responsible for another day and 12 buttons that each of them is resbonsible for another month and that will be only for one field. so like that i have to do again for each field.
so the thing i want is how to make a function that the player can choose the date he wish for with out make so much trouble.
e.g.
the player is going into card that one text field is there that responsible for Month and Day and when the player clicking on that it will ask him what is the month and day he wishes for and after he is clicking on that (17 September) it will show in the text field "September 17"

Really sorry for all the mess i barely know how to ask the question in English but i tried the most, thanks for all the helpers !!

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Functions

Post by Klaus » Sat Oct 06, 2012 1:26 pm

Hi,

welcome to the forum!

But sorry, I don't have the slightest idea what you are looking for and that is not the result of your not so bad english! 8)


Best

Klaus

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Re: Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 1:42 pm

Thanks,

im looking for something that will give the player the option to choose date without so many troubles.

I want that will be a push button or text field or something just for giving the player the option for choosing a date (September 9, Friday) if he clicks on it :@

e.g.

There is a push button, im clicking on it, a little window opens and asking me for a month and a day i want to fill in, after im doing it, i will see on the same place i clicked the date i've been choosed.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Functions

Post by Klaus » Sat Oct 06, 2012 1:51 pm

Hi,

AHA! We are getting nearer :D

OK, are the fields LOCKED? I mean, can the user enter a date directly into these fields?
I think not, right?

In that case you could add the "mouseup" script from your button directly to the field(s) like this:

Code: Select all

on mouseup
   ASK "BlaBlaBliBli"
   ## or whatever you scripted in the button
   
   ## Now write the ANSWER back into the field, ME is the field itself, so this will work:
   put IT into me
end mouseup
Or something like this...

Plaese check these stacks, great learning resources:
http://www.runrev.com/developers/lesson ... nferences/


Best

Klaus

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Re: Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 1:59 pm

I didn't really understand what you did,

it the code was for textfield or button ?

and when you wrote ask "BliBliBlaBla" i didn't understand what you meant ? :cry: it also say inccorrectly ?

Thanks again

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Functions

Post by Klaus » Sat Oct 06, 2012 2:10 pm

What is the script of your button?
Please post the code.

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Re: Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 2:16 pm

Ok, i understood thank you really much,

So now the thing im looking for is that the question will have the oppertunity to choose only on "Day" from 1-31 and on "Month" from 1-12 and the answer of the player can only be the number
of the day and the number of the month.

And then, when the player clicking he can choose number of day from 1-31 and number of month from 1-12 and after he choosing that he will be able to see the long date on the field.

e.g.

i clicked on Number of month - 9 and day of month - 12 after it i will see in my field Month September, Day 12 Wednesday

Thanks alot

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Functions

Post by Klaus » Sat Oct 06, 2012 2:22 pm

Hi,

looks like you are looking for a real CALENDAR, where the user can choose a date from!

Check the one on this page:
http://www.troz.net/rev/index.irev?category=All#stacks
You can add this as a substack to our stack.

But it may not be trivial for you to implement this into your app, so I really recommend to learn a bit more about
Livecode before you start this "advanced" stuff. Check the stacks in my link, please!


Best

Klaus

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Re: Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 2:47 pm

Can you please tell me which one of them is the one im looking for ? Thank you

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Functions

Post by Klaus » Sat Oct 06, 2012 2:54 pm

Oh, come on!

Check the word in CAPITALS in the first sentence in my last posting...

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Re: Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 3:12 pm

Lol, sorry
it just sometimes there is words that i dont understand and from what i learnd you dont have to understand each word so i just jumped to the other :@

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Re: Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 3:21 pm

ok so i dont understand few things over there:

A) When im pressing on "Ask Date" and choosing a date it changes the date of it and the date of the current day

B) What is Calender size ?

C) What is the meaning week starts on ?

D) How do i making a scrolling field ?

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Functions

Post by Klaus » Sat Oct 06, 2012 4:02 pm

Hi,

a. Yes, it puts the selected date (the one you chose in the actual calendar) into these fields!
What did you exspect?

b. why don't you play around a bit with that stack and try to understand what it is doing?
And maybe also read the text at the botton of the stack?
You can have the calendar in one of three sizes: small, medium, and big

c. I do not know where you are located, but in most english speaking countries the week in a calendar starts on SUNDAY,
in most european countries, like here in germany, it starts on MONDAY.
And this is what you can select here

d. there is an object for this in the rev TOOLS palette!
It is a field with a scrollbar :shock:

Please do yourself (and us) a favour and work through the stacks I mentioned above (Scripting conferences) to get the basics of Livecode!


Best

Klaus

BlaBlaBliBli
Posts: 37
Joined: Sat Oct 06, 2012 12:22 pm

Re: Functions

Post by BlaBlaBliBli » Sat Oct 06, 2012 4:11 pm

Man im a lil bit confused...

I saw this thing and tried to learn from it alot but i dont really know what to do ...

It just that i need to make of this to each card no for only one, and the names im adding have to be with sence...

e.g. im going to card "Date to beggin the work" im pressing on the button to add and then im adding the day and month.

on another card i can see a scrolling field which automatically added while i chose my date and it says "Date to beggin the work" (and the date i chose)

and from another card i want a date for another thing so i go to the category of the other card that says "Day of meeting with grandma" and choose the button that showing me the day and month i want, but it's not on the same place the other button was cuz its another card i came from so i want to do alot of this but i can't just copy it plenty of time i dont even know how to do it so after i added date September, Day 17 Monday, its adding it to the text field on card "Day on meeting with garndma" and automatically adds it to th scrolling field line under "Date to beggin the work"

have you understood now :@ ?

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Functions

Post by Klaus » Sat Oct 06, 2012 4:46 pm

BlaBlaBliBli wrote:have you understood now :@ ?
NOW? I understod you all the time (except your first posting), but do definitvely not have the time to create your app for you!
Nor to explain exactly all the basics of Livecode neccessary for this. OK, maybe creating the app for you would probably take less time 8)

Please excuse this metaphore, but this is like explaining to someone who does not have a driver license yet how to drive and win an auto rally.
You are completely missing the basics, don't take it personally, but this is a forum and not a beginner course of Livecode.

Work through the stacks I mentioned above and start SMALL, means solve one little problem after another*** until you are able to combine them
to create the app you want to.

*** Like adding text to a field, which may even not be on the same card...


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”