Glad you got it working!
Weather iOS app
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Weather iOS app
Ah, OK, I see!
Glad you got it working!
Glad you got it working!
-
catalinanesia
- Posts: 83
- Joined: Sun Feb 16, 2014 10:08 pm
Re: Weather iOS app
Klaus,
Why will never scroll back to letter A and hi-lite the row?
It will go nicely down (B,C,D,E,F,etc.) but not back to exactly A and hi-lite ?
Any hint?
Why will never scroll back to letter A and hi-lite the row?
It will go nicely down (B,C,D,E,F,etc.) but not back to exactly A and hi-lite ?
Any hint?
Re: Weather iOS app
As I wrote, I just tested this here and worked as exspected!?
Please post your script.
Please post your script.
-
catalinanesia
- Posts: 83
- Joined: Sun Feb 16, 2014 10:08 pm
Re: Weather iOS app
Klaus,
I modified this portion of your latest code and it woks:
Also I added a button (0) to the group.
Thanks!
I modified this portion of your latest code and it woks:
Code: Select all
if tOffset > 0 then -- I replaced 1 with 0
add 1 to tOffset
end if
Thanks!
Re: Weather iOS app
Hi Catalin,
hm, with your modification, clicking A will display and hilite the SECOND line in my field!
And since we already exited when tOffSet = 0, tOffSet will ALWAYS be > 0 after that!
So "... > 1" is correct. Know what I mean?
Can you post the stack here or maybe send it to me and I can take look?
klaus AT major-k.de
Best
Klaus
hm, with your modification, clicking A will display and hilite the SECOND line in my field!
And since we already exited when tOffSet = 0, tOffSet will ALWAYS be > 0 after that!
So "... > 1" is correct. Know what I mean?
Can you post the stack here or maybe send it to me and I can take look?
klaus AT major-k.de
Best
Klaus
-
catalinanesia
- Posts: 83
- Joined: Sun Feb 16, 2014 10:08 pm
Re: Weather iOS app
Hi Klaus,
see the attached stack, I left a comment on the code close to the end with your name.
If I replace the 1 with 0 then when I click the button A will go to that line if not then will
never hi-lite the A line ...
Thanks for the help, it works for me as intended ...
Regards,
Catalin
see the attached stack, I left a comment on the code close to the end with your name.
If I replace the 1 with 0 then when I click the button A will go to that line if not then will
never hi-lite the A line ...
Thanks for the help, it works for me as intended ...
Regards,
Catalin
- Attachments
-
- Weather1.zip
- (1.37 KiB) Downloaded 324 times
Re: Weather iOS app
AHA! Now I get it, me and my script presumed that A was the very first letter in that field, did not think of a ZERO
OK, after thinking it over again, I think I have forgotten something very important to make it work all the time,
no matter what thte first char actually is. Oops
Please use this script and all is fine:
OK, after thinking it over again, I think I have forgotten something very important to make it work all the time,
no matter what thte first char actually is. Oops
Please use this script and all is fine:
Code: Select all
on mouseup
## What button did the user click:
put the label of the target into tFirstChar
## Check if a City with that first character is in the list
put lineOffset(CR & tFirstChar, CR & field "citylist") into tOffSet
## FORGOT to also use -> ...CR & field "citylist"), silly me :-)
if tOffSet = 0 then
beep
exit mouseup
end if
## Success! Now scroll the first line starting with that character into view:
set the scroll of field "citylist" to round(tOffSet * the effective textHeight of field "citylist")
add 1 to tOffset
set the hilitedlines of fld "citylist" to tOffSet
set itemdel to TAB
put item 2 of the selectedtext of fld "citylist" into tCode
put tCode into field "CityCode"
end mouseupRe: Weather iOS app
i have make a full weather application on the LC is about 80% ready.
here is some photos full weather day + scroll with 36 hours and second view with week days.
is xml parse and i have stop the project.


here is some photos full weather day + scroll with 36 hours and second view with week days.
is xml parse and i have stop the project.


-
catalinanesia
- Posts: 83
- Joined: Sun Feb 16, 2014 10:08 pm
Re: Weather iOS app
Nicely done brandcode,
why stop? it definitely looks good ...
What was the hardest part?
What was the easiest part?
Did you used Data Grids?
What is the most consuming part: programming or graphics?
What API you used?
do you mind to share some dev. insight? ...
I am studying the DG's now to implement them in my app,
I have started with a very long scroll field to put the world
City's in but then I wanted to add a "country flag" to be displayed
on each city row so I ended up reading about the DG's ...
Now I have skelet of a DG and I am trying to figure out a way of
transferring the long list of city's into it ...
Over all I have fun with LC.
Regards,
Catalin
why stop? it definitely looks good ...
What was the hardest part?
What was the easiest part?
Did you used Data Grids?
What is the most consuming part: programming or graphics?
What API you used?
do you mind to share some dev. insight? ...
I am studying the DG's now to implement them in my app,
I have started with a very long scroll field to put the world
City's in but then I wanted to add a "country flag" to be displayed
on each city row so I ended up reading about the DG's ...
Now I have skelet of a DG and I am trying to figure out a way of
transferring the long list of city's into it ...
Over all I have fun with LC.
Regards,
Catalin
Re: Weather iOS app
Hi Catalin.
There is no hard part for the application,was easy!!
The consuming part is the Graphics and most of them the Icons,because you need to synchronize time,city,hour with them.
There is no datagrid in applications you don't need it at all.
The Only part that need to be careful is the repeat commands,because need to extract specific parts from xml,or json format.
I use xml with xml parse and the api i have use is wunderground and wwo for alternative.
About the flags from city's and the DG.
For DG start with this http://lessons.runrev.com/m/datagrid/l/ ... -with-data
if you want to work with datagrids this is best tool for you http://livecode.com/products/thirdparty ... per-1-3-4/ you save time !!
i will put the project for sale next week because i have stop using LC.
I hope you have fun with LC.
There is no hard part for the application,was easy!!
The consuming part is the Graphics and most of them the Icons,because you need to synchronize time,city,hour with them.
There is no datagrid in applications you don't need it at all.
The Only part that need to be careful is the repeat commands,because need to extract specific parts from xml,or json format.
I use xml with xml parse and the api i have use is wunderground and wwo for alternative.
About the flags from city's and the DG.
For DG start with this http://lessons.runrev.com/m/datagrid/l/ ... -with-data
if you want to work with datagrids this is best tool for you http://livecode.com/products/thirdparty ... per-1-3-4/ you save time !!
i will put the project for sale next week because i have stop using LC.
I hope you have fun with LC.