TickedOff - Stage6 Complete strange behavior

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
dandun
Posts: 24
Joined: Thu Apr 10, 2014 3:41 pm

TickedOff - Stage6 Complete strange behavior

Post by dandun » Mon Jun 09, 2014 6:33 pm

Hello, I was hoping someone can help me with what appears to be a bug in the TickedOff Summer Academy app. I have just went through the DVD training version of TickedOff and found that my app was not performing correctly. When I went back to the final course completed application, ”TickedOff-stage6 Complete.livecode”, I found it is acting the exact same way with the problem I found on mine.


1. I create 3 new tasks (see image 1)
2. I click on Task 1, advance to card “Task Editor”. Title it and type a few numbered comments in the description field and click on the “Task List” Button to return to the tasklist card. (see image 2)
3. I always get some sort of strange behavior. Where the previous tasks are either removed or advanced a few rows down with blank rows or a “false” statement. (see image 3)

Am I missing a final completed course or is this never been brought up before?

Thank You
Dan
Attachments
tickedoff.GIF

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: TickedOff - Stage6 Complete strange behavior

Post by sefrojones » Mon Jun 09, 2014 9:13 pm

Dan,

It seems that the Ticked Off tutorials are now available only on the DVD, which I do not have access to, but would you mind expanding your problem to include the LiveCode version and Operating System you're using?

--Sefro

dandun
Posts: 24
Joined: Thu Apr 10, 2014 3:41 pm

Re: TickedOff - Stage6 Complete strange behavior

Post by dandun » Mon Jun 09, 2014 9:26 pm

Hi Sefro,

I am running Windows 7, Livecode version 6.5. I know there is more recent beta versions of Livecode, but as I am new and was having some stability issues with the later versions, I decided to drop back to 6.5.

Sorry just to expand. When returning to the original list after editing the description field, the previously created tasks in the list field are either gone or have been pushed down by a number of blank tasks. They function as a normal task and I go select them and delete them, but the point is that the original list is being effected when I add a description to a task.

Thank you for your response
Dan

dandun
Posts: 24
Joined: Thu Apr 10, 2014 3:41 pm

Re: TickedOff - Stage6 Complete strange behavior

Post by dandun » Tue Jun 10, 2014 6:06 pm

I think the problem is related to the Task List Card Script, but not sure where the issue is.

on buildListDisplay
## Check how many tasks we currently have in the list
put taskCount() into tTaskCount

## Get the list of tasks from the database
put allTaskDetails() into tTaskDetails

## Clear the field so we can rebuild the list from scratch
put empty into fld "tasklist"

## The task data is tab separated
set the itemDel to tab

repeat with x = 1 to tTaskCount
put item 1 of line x of tTaskDetails into tTaskID
put item 2 of line x of tTaskDetails into tTaskName
put item 4 of line x of tTaskDetails into tCompleted
if tCompleted = true then
put "<p><strike>" & tTaskName & "</strike></p>" after tTaskList
else
put "<p>" & tTaskName & "</p>" after tTaskList
end if
end repeat
set the htmlText of fld "tasklist" to tTaskList

## Using htmlText lets us use strikethrough in text
set the htmlText of fld "tasklist" to tTaskList

## Only see lines for the task we have
set the height of fld "tasklist" to the formattedHeight of fld "tasklist"

if tTaskCount > 0 then
set the hGrid of fld "tasklist" to true
else
set the hGrid of fld "tasklist" to false
end if

## Set up the scroller on mobile
setupUIScroll
end buildListDisplay

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: TickedOff - Stage6 Complete strange behavior

Post by jacque » Tue Jun 10, 2014 6:28 pm

I think the problem is that the app uses carriage returns to separate tasks, and your list adds carriage returns to the data. That makes the app think there are more tasks than there really are.

To fix that, either rewrite the scripts to use something other than returns to separate lines (each line is a task) or don't make lists inside a task. It's been a long time since I looked at those scripts, but you could probably just change the lineDelimiter property before writing or saving tasks and the rest of the script should take care of itself.

I may be off base though, it's been 3 years since I worked with the stack.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dandun
Posts: 24
Joined: Thu Apr 10, 2014 3:41 pm

Re: TickedOff - Stage6 Complete strange behavior

Post by dandun » Tue Jun 10, 2014 7:53 pm

Thanks Jaque, that does make sense as if I just hit a CR once and return back to the list I get a "false" in the title. At lease I have a place to look into further!

Kind Regards
Dan

Post Reply