From 71eedb644330b39d6af7bc7bff4e736c0f97085a Mon Sep 17 00:00:00 2001 From: Brian Milby Date: Sat, 10 Mar 2018 22:52:06 -0600 Subject: [PATCH 001/402] LCG Demo - Add Navigation Bar option to highlight none of the icons `set the hilitedItem of widget to 0` will disable the highlight The selected item index allowed minimum was changed to 0 If the hilitedItem is 0, then an empty string will be returned for the name. --- extensions/widgets/navbar/navbar.lcb | 16 +++++++++++----- extensions/widgets/navbar/notes/lcg-demo.md | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 extensions/widgets/navbar/notes/lcg-demo.md diff --git a/extensions/widgets/navbar/navbar.lcb b/extensions/widgets/navbar/navbar.lcb index 2cd9a7d446e..87e733ca196 100644 --- a/extensions/widgets/navbar/navbar.lcb +++ b/extensions/widgets/navbar/navbar.lcb @@ -356,6 +356,8 @@ Description: The is the item number of the currently-highlighted navigation item, starting from 1. It can be used as a key into the . +Setting 0 will cause nothing to be highlighted. + Related: hilitedItemName (property) References: itemArray(property) @@ -365,7 +367,7 @@ metadata hilitedItem.editor is "com.livecode.pi.integer" metadata hilitedItem.default is "1" metadata hilitedItem.label is "Selected item index" metadata hilitedItem.step is "1" -metadata hilitedItem.min is "1" +metadata hilitedItem.min is "0" /** Syntax: set the hilitedItemName of to @@ -1249,7 +1251,7 @@ end handler public handler setNavSelectedItem(in pSelectedItem as Integer) returns nothing if pSelectedItem is not mSelectedItem and \ - pSelectedItem > 0 and \ + pSelectedItem >= 0 and \ pSelectedItem <= the number of elements in mNavData then put pSelectedItem into mSelectedItem post "hiliteChanged" @@ -1260,10 +1262,10 @@ end handler public handler setNavSelectedItemName(in pName as String) returns nothing variable tCount as Integer variable tItem as Array - + -- Find the item index corresponding to pName and set it as the -- currently-highlighted item. - + repeat with tCount from 1 up to the number of elements in mNavData put mNavData[tCount] into tItem if tItem["name"] is pName then @@ -1275,7 +1277,11 @@ public handler setNavSelectedItemName(in pName as String) returns nothing end handler public handler getNavSelectedItemName() returns String - return mNavData[mSelectedItem]["name"] + if mSelectedItem = 0 then + return "" + else + return mNavData[mSelectedItem]["name"] + end if end handler public handler setItemStyle(in pItemStyle as String) returns nothing diff --git a/extensions/widgets/navbar/notes/lcg-demo.md b/extensions/widgets/navbar/notes/lcg-demo.md new file mode 100644 index 00000000000..55433b10c19 --- /dev/null +++ b/extensions/widgets/navbar/notes/lcg-demo.md @@ -0,0 +1 @@ +#LCG Demo - Add Navigation Bar option to highlight none of the icons From aa9649b5440ed2345bffd6d12d01e74120ecbeec Mon Sep 17 00:00:00 2001 From: Brian Milby Date: Thu, 19 Apr 2018 21:58:11 -0500 Subject: [PATCH 002/402] [[ Navigation Bar ]] Add option to highlight none of the icons Update documentation references for the new 0 option to have nothing highlighted. Add ability to set the selected icon name to "" to make nothing highlight. Updated documentation to indicate that custom icons are possible (reference Icon SVG Library). Renamed note and expanded to document potential backward compatibility issue (a call to `getNavSelectedItemName` in a previous version of the widget with nothing selected will throw an error). --- extensions/widgets/navbar/navbar.lcb | 30 ++++++++++++------- .../navbar/notes/feature-nohighlight.md | 18 +++++++++++ extensions/widgets/navbar/notes/lcg-demo.md | 1 - 3 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 extensions/widgets/navbar/notes/feature-nohighlight.md delete mode 100644 extensions/widgets/navbar/notes/lcg-demo.md diff --git a/extensions/widgets/navbar/navbar.lcb b/extensions/widgets/navbar/navbar.lcb index 87e733ca196..016de180eb0 100644 --- a/extensions/widgets/navbar/navbar.lcb +++ b/extensions/widgets/navbar/navbar.lcb @@ -25,7 +25,7 @@ The widget displays a row of navigation items. Each of these has a , or both. All of the navigation item data is available as a single array via the property. -At any time, one of the navigation items may be +At any time, zero or one of the navigation items may be . This is useful, for example, for indicating the current card. When the user clicks one of the navigation items, the widget sends a message. @@ -117,7 +117,7 @@ use com.livecode.library.widgetutils -- adding metadata to ensure the extension displays correctly in livecode metadata author is "LiveCode" -metadata version is "2.0.0" +metadata version is "2.1.0" metadata title is "Navigation Bar" metadata preferredSize is "320,49" metadata svgicon is "M0,0v29.5h80.2V0H0z M21.1,21.5c-0.2-0.1-0.4-0.2-0.4-0.2c-0.5-0.2-0.9-0.3-1.4-0.4c-0.7-0.1-0.9-0.4-0.9-1.1c0-0.1-0.1-0.9,0-1c0.4-0.2,0.5-0.9,0.5-1.3c0-0.3,0.2-0.5,0.3-0.7c0.2-0.3,0.2-0.6,0.3-0.9c0.1-0.2,0.2-0.6,0.1-0.8c0-0.2-0.2-0.4-0.2-0.6c0-0.3,0.1-0.6,0.1-0.9c0-0.5,0-0.9,0-1.4c-0.2-1.2-1.4-1.6-2.5-1.9c-1-0.2-2.2,0.3-2.9,1c-0.3,0.3-0.6,0.7-0.7,1.1c-0.1,0.4,0,0.9,0,1.2c0,0.2,0,0.4,0.1,0.6c0,0.2,0.1,0.3,0.1,0.5c0,0.1-0.1,0.2-0.1,0.3c-0.2,0.4,0,1,0.2,1.4c0.1,0.2,0.2,0.4,0.3,0.5c0.2,0.2,0.2,0.3,0.2,0.6c0,0.4,0.1,1.2,0.6,1.4c0.1,0.1,0,0.8-0.1,0.9c0,0.7,0,1-0.6,1.1c-0.5,0.1-0.9,0.2-1.4,0.4c-0.2,0.1-0.4,0.2-0.7,0.3c-2-1.4-3.4-3.8-3.4-6.4c0-4.3,3.5-7.8,7.8-7.8s7.8,3.5,7.8,7.8C24.3,17.8,23,20.1,21.1,21.5z M45.1,22.7l-4.9-3.6v-0.7l0.2,0.2l3.6,2.6L42.6,17l-0.1-0.4l0.3-0.3l3.4-2.5H42h-0.4l-0.1-0.4l-1.4-4.2l-1.4,4.2l-0.1,0.4h-0.4h-4.3l3.4,2.5l0.3,0.3L37.5,17l-1.4,4.2l3.6-2.6l0.2-0.2v0.7L35,22.7l1.9-5.9l-4.9-3.6h6.1l1.9-5.9l1.9,5.9h6.1l-4.9,3.6L45.1,22.7z M71.1,23.1l-4.9-4.9c-1,0.9-2.4,1.4-3.9,1.5V19c3-0.1,5.4-2.5,5.4-5.5c0-3.1-2.5-5.5-5.5-5.5c-3.1,0-5.5,2.5-5.5,5.5c0,3,2.4,5.4,5.4,5.5v0.7c-3.4-0.1-6-2.8-6-6.2c0-3.4,2.8-6.2,6.2-6.2c3.4,0,6.2,2.8,6.2,6.2c0,1.5-0.6,2.9-1.5,4l4.9,4.9L71.1,23.1z" @@ -241,9 +241,11 @@ Description: The names of the icons displayed by the navigation items when not highlighted. -Each icon name must be one of the predefined graphics provided by the "IconSVG" +Each icon name must be one of the graphics supplied by the "IconSVG" library. You can get a list of available predefined path names by running -`put iconNames()` in the Message Box. +`put iconNames()` in the Message Box. See the + +documentation for handlers to manage user icon families. Setting the can add items to the navigation bar. If the new value of the has more items than the navigation bar, @@ -256,7 +258,7 @@ navigation bar, the remaining navigation items have their icons reset to the default icon. References: hilitedItemIcons(property), itemLabels(property), -itemNames(property) +itemNames(property), com.livecode.library.iconsvg (library) */ property itemIcons get getNavIcons set setNavIcons @@ -273,9 +275,11 @@ Description: The names of the icons displayed by the navigation items when highlighted. -Each icon name must be one of the predefined graphics provided by the "IconSVG" +Each icon name must be one of the graphics supplied by the "IconSVG" library. You can get a list of available predefined path names by running -`put iconNames()` in the Message Box. +`put iconNames()` in the Message Box. See the + +documentation for handlers to manage user icon families. Setting the can add items to the navigation bar. If the new value of the has more items than the @@ -287,7 +291,8 @@ If the new value of the has fewer items than the navigation bar, the remaining navigation items have their highlighted-state icons reset to the default icon. -References: itemIcons(property), itemLabels(property), itemNames(property) +References: itemIcons(property), itemLabels(property), itemNames(property), +com.livecode.library.iconsvg (library) */ property hilitedItemIcons get getNavSelectedIcons set setNavSelectedIcons metadata hilitedItemIcons.user_visible is "false" @@ -354,7 +359,7 @@ Value(integer): The item number of the navigation item that is highlighted. Description: The is the item number of the currently-highlighted navigation -item, starting from 1. It can be used as a key into the . +item. It can be used as a key into the . Setting 0 will cause nothing to be highlighted. @@ -379,7 +384,7 @@ Value(string): The name of the navigation item that is highlighted. Description: The is the name of the currently-highlighted navigation -item. +item. If nothing is highlighted, the value is an empty string. References: hilitedItem (property) */ @@ -1263,6 +1268,11 @@ public handler setNavSelectedItemName(in pName as String) returns nothing variable tCount as Integer variable tItem as Array + if pName is "" then + setNavSelectedItem(0) + return + end if + -- Find the item index corresponding to pName and set it as the -- currently-highlighted item. diff --git a/extensions/widgets/navbar/notes/feature-nohighlight.md b/extensions/widgets/navbar/notes/feature-nohighlight.md new file mode 100644 index 00000000000..0bd4c55991f --- /dev/null +++ b/extensions/widgets/navbar/notes/feature-nohighlight.md @@ -0,0 +1,18 @@ +# No Highlight Option + +Add an option to have none of the navigation items highlighted. + +## Properties + +* The **hilightedItem** property has been enhanced to accept a value of + 0 which indicates that no items will be highlighted. + +## Backward Compatibility Note + +* If a stack is saved without an item being highlighted, then when + opened in an earlier version of the widget, a call to + `getNavSelectedItemName` will throw an error if called before an + item is selected. + +* The widget will render properly (with nothing highlighted) and issue + the **hiliteChanged** message when an item is selected. \ No newline at end of file diff --git a/extensions/widgets/navbar/notes/lcg-demo.md b/extensions/widgets/navbar/notes/lcg-demo.md deleted file mode 100644 index 55433b10c19..00000000000 --- a/extensions/widgets/navbar/notes/lcg-demo.md +++ /dev/null @@ -1 +0,0 @@ -#LCG Demo - Add Navigation Bar option to highlight none of the icons From d22023f313a89d84f456555f139c15b900065b61 Mon Sep 17 00:00:00 2001 From: livecodepanos Date: Tue, 18 Jun 2019 16:34:15 +0300 Subject: [PATCH 003/402] [22187] Ensure rewind and fast forward buttons do not affect playrate --- docs/notes/bugfix-22187.md | 1 + engine/src/player-platform.cpp | 23 +++++++++++++++++++++++ engine/src/player-platform.h | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 docs/notes/bugfix-22187.md diff --git a/docs/notes/bugfix-22187.md b/docs/notes/bugfix-22187.md new file mode 100644 index 00000000000..e578d9d82c1 --- /dev/null +++ b/docs/notes/bugfix-22187.md @@ -0,0 +1 @@ +# Ensure rewind and fast forward buttons do not alter the existing playrate of the player after they are pressed diff --git a/engine/src/player-platform.cpp b/engine/src/player-platform.cpp index f63e89d7927..77d39e74018 100644 --- a/engine/src/player-platform.cpp +++ b/engine/src/player-platform.cpp @@ -3351,6 +3351,9 @@ void MCPlayer::handle_mdown(int p_which) } break; case kMCPlayerControllerPartScrubBack: + + push_current_rate(); + // PM-2014-08-12: [[ Bug 13120 ]] Cmd + click on scrub buttons starts playing in the appropriate direction if (hasfilename() && (MCmodifierstate & MS_CONTROL) != 0) { @@ -3385,6 +3388,9 @@ void MCPlayer::handle_mdown(int p_which) break; case kMCPlayerControllerPartScrubForward: + + push_current_rate(); + // PM-2014-08-12: [[ Bug 13120 ]] Cmd + click on scrub buttons starts playing in the appropriate direction if (hasfilename() && (MCmodifierstate & MS_CONTROL) != 0) { @@ -3429,6 +3435,21 @@ void MCPlayer::handle_mdown(int p_which) } } +void MCPlayer::push_current_rate() +{ + // get current rate + double t_old_rate; + MCPlatformGetPlayerProperty(m_platform_player, kMCPlatformPlayerPropertyPlayRate, kMCPlatformPropertyTypeDouble, &t_old_rate); + m_rate_before_scrub_buttons_pressed = t_old_rate; +} + +void MCPlayer::pop_current_rate() +{ + // get current rate + double t_old_rate = m_rate_before_scrub_buttons_pressed; + MCPlatformSetPlayerProperty(m_platform_player, kMCPlatformPlayerPropertyPlayRate, kMCPlatformPropertyTypeDouble, &t_old_rate); +} + void MCPlayer::handle_mfocus(int x, int y) { if (state & CS_MFOCUSED) @@ -3583,12 +3604,14 @@ void MCPlayer::handle_mup(int p_which) switch (m_grabbed_part) { case kMCPlayerControllerPartScrubBack: + pop_current_rate(); m_scrub_back_is_pressed = false; playpause(m_was_paused); layer_redrawall(); break; case kMCPlayerControllerPartScrubForward: + pop_current_rate(); m_scrub_forward_is_pressed = false; playpause(m_was_paused); layer_redrawall(); diff --git a/engine/src/player-platform.h b/engine/src/player-platform.h index 2eb65dbfcc1..5ebbfb2141c 100644 --- a/engine/src/player-platform.h +++ b/engine/src/player-platform.h @@ -85,6 +85,7 @@ class MCPlayer : public MCControl, public MCMixinObjectHandle, public bool m_scrub_back_is_pressed : 1; bool m_scrub_forward_is_pressed : 1; bool m_modify_selection_while_playing : 1; + double m_rate_before_scrub_buttons_pressed; static MCPropertyInfo kProperties[]; static MCObjectPropertyTable kPropertyTable; @@ -436,6 +437,9 @@ class MCPlayer : public MCControl, public MCMixinObjectHandle, public void handle_mup(int which); void handle_mfocus(int x, int y); + void push_current_rate(); + void pop_current_rate(); + void popup_closed(void); // PM-2014-10-14: [[ Bug 13569 ]] Make sure changes to player are not visible in preOpenCard From ac92c831d41bc2ce9ada5e2a05c74bb0e10f3242 Mon Sep 17 00:00:00 2001 From: livecodepanos Date: Wed, 26 Jun 2019 09:33:17 +0300 Subject: [PATCH 004/402] [22209] Updated copyright notice --- docs/notes/bugfix-22209.md | 1 + engine/rsrc/Installer-Info.plist | 6 +++--- engine/rsrc/LiveCode-Info.plist | 6 +++--- engine/rsrc/Standalone-Info.plist | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 docs/notes/bugfix-22209.md diff --git a/docs/notes/bugfix-22209.md b/docs/notes/bugfix-22209.md new file mode 100644 index 00000000000..1ab9432b4de --- /dev/null +++ b/docs/notes/bugfix-22209.md @@ -0,0 +1 @@ +# Update copyright notice diff --git a/engine/rsrc/Installer-Info.plist b/engine/rsrc/Installer-Info.plist index 206727462b8..5f427d0e313 100644 --- a/engine/rsrc/Installer-Info.plist +++ b/engine/rsrc/Installer-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(PRODUCT_NAME) CFBundleGetInfoString - $(BUILD_LONG_VERSION), Copyright 2000-2015 LiveCode Ltd. + $(BUILD_LONG_VERSION), Copyright 2000-2019 LiveCode Ltd. CFBundleIconFile installer.icns CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - $(BUILD_LONG_VERSION), Copyright 2000-2015 LiveCode Ltd. + $(BUILD_LONG_VERSION), Copyright 2000-2019 LiveCode Ltd. CFBundleName Installer CFBundlePackageType @@ -35,7 +35,7 @@ NSAppleScriptEnabled YES NSHumanReadableCopyright - Copyright 2000-2015, LiveCode Ltd., All Rights Reserved. + Copyright 2000-2019, LiveCode Ltd., All Rights Reserved. NSHighResolutionCapable NSPrincipalClass diff --git a/engine/rsrc/LiveCode-Info.plist b/engine/rsrc/LiveCode-Info.plist index 008165f5dd2..45eec40fb55 100644 --- a/engine/rsrc/LiveCode-Info.plist +++ b/engine/rsrc/LiveCode-Info.plist @@ -28,7 +28,7 @@ CFBundleExecutable $(PRODUCT_NAME) CFBundleGetInfoString - $(BUILD_LONG_VERSION), Copyright 2000-2015 LiveCode Ltd. + $(BUILD_LONG_VERSION), Copyright 2000-2019 LiveCode Ltd. CFBundleIconFile LiveCode.icns CFBundleIdentifier @@ -36,7 +36,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - $(BUILD_LONG_VERSION), Copyright 2000-2015 LiveCode Ltd. + $(BUILD_LONG_VERSION), Copyright 2000-2019 LiveCode Ltd. CFBundleName LiveCode CFBundlePackageType @@ -68,7 +68,7 @@ OSAScriptingDefinition terminology.sdef NSHumanReadableCopyright - Copyright 2000-2015, LiveCode Ltd., All Rights Reserved. + Copyright 2000-2019, LiveCode Ltd., All Rights Reserved. UTExportedTypeDeclarations diff --git a/engine/rsrc/Standalone-Info.plist b/engine/rsrc/Standalone-Info.plist index 7201628a740..41caa005e4f 100644 --- a/engine/rsrc/Standalone-Info.plist +++ b/engine/rsrc/Standalone-Info.plist @@ -26,7 +26,7 @@ CFBundleExecutable $(PRODUCT_NAME) CFBundleGetInfoString - $(BUILD_LONG_VERSION), Copyright 2000-2015 LiveCode Ltd. + $(BUILD_LONG_VERSION), Copyright 2000-2019 LiveCode Ltd. CFBundleIconFile Standalone.icns CFBundleIdentifier @@ -34,7 +34,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - $(BUILD_LONG_VERSION), Copyright 2000-2015 LiveCode Ltd. + $(BUILD_LONG_VERSION), Copyright 2000-2019 LiveCode Ltd. CFBundleName LiveCode CFBundlePackageType @@ -59,7 +59,7 @@ NSAppleScriptEnabled YES NSHumanReadableCopyright - Copyright 2000-2015, LiveCode Ltd., All Rights Reserved. + Copyright 2000-2019, LiveCode Ltd., All Rights Reserved. NSPrincipalClass com_runrev_livecode_MCApplication NSHighResolutionCapable From c9768933659c27a93329897693e21efce10ec6f0 Mon Sep 17 00:00:00 2001 From: livecodepanos Date: Fri, 11 Oct 2019 11:31:10 +0300 Subject: [PATCH 005/402] [22401] Ensure iOS time picker always returns the displayed time --- docs/notes/bugfix-22401.md | 1 + engine/src/mbliphonepickdate.mm | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 docs/notes/bugfix-22401.md diff --git a/docs/notes/bugfix-22401.md b/docs/notes/bugfix-22401.md new file mode 100644 index 00000000000..6586d4e8151 --- /dev/null +++ b/docs/notes/bugfix-22401.md @@ -0,0 +1 @@ +# Ensure the iOS time picker always returns the displayed (rounded) time diff --git a/engine/src/mbliphonepickdate.mm b/engine/src/mbliphonepickdate.mm index 7512efda462..fa4fc8c576d 100644 --- a/engine/src/mbliphonepickdate.mm +++ b/engine/src/mbliphonepickdate.mm @@ -419,12 +419,28 @@ -(void)dateChanged:(id)sender NSLog(@"Date = %d\n", t_date); } +- (NSInteger)getRoundedDate:(NSDate *)originalDate withStep:(NSInteger)step +{ + // The originalDate is not rounded down to the nearest "step" minutes. + NSInteger t_original_date_in_seconds = [originalDate timeIntervalSince1970]; + + // Get the "extra" minutes and convert them to seconds + NSInteger t_extra_seconds = t_original_date_in_seconds % (step * 60); + + // Get the rounded date in seconds + NSInteger t_seconds_rounded_down_to_step = t_original_date_in_seconds - t_extra_seconds; + + return t_seconds_rounded_down_to_step; +} + // called when the action sheet is dispmissed (iPhone, iPod) - (void)dismissDatePickWheel:(NSObject *)controlButton { // dismiss the action sheet programmatically m_selection_made = true; - m_selected_date = [[datePicker date] timeIntervalSince1970]; + + NSInteger t_step = [datePicker minuteInterval]; + m_selected_date = [self getRoundedDate: datePicker.date withStep:t_step]; if (iSiPad) { @@ -527,7 +543,10 @@ - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverControl { m_running = false; m_selection_made = true; - m_selected_date = [[datePicker date] timeIntervalSince1970]; + + NSInteger t_step = [datePicker minuteInterval]; + m_selected_date = [self getRoundedDate: datePicker.date withStep:t_step]; + // MW-2011-08-16: [[ Wait ]] Tell the wait to exit (our wait has anyevent == True). MCscreen -> pingwait(); } From cec0262682e65acbf7f1e0f7bc4574fc233f0bae Mon Sep 17 00:00:00 2001 From: livecodesam Date: Fri, 11 Oct 2019 12:10:37 +0100 Subject: [PATCH 006/402] [Bugfix-19848] Mention lockLoc allows arrow key movement Added a remark at the end of the lockLocation entry that it is still possible to move an object with the arrow keys while that property is set to true. --- docs/dictionary/property/lockLocation.lcdoc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/dictionary/property/lockLocation.lcdoc b/docs/dictionary/property/lockLocation.lcdoc index 9ea8c747760..cb72005ecd8 100644 --- a/docs/dictionary/property/lockLocation.lcdoc +++ b/docs/dictionary/property/lockLocation.lcdoc @@ -65,15 +65,18 @@ edge moves. > setting. The setting of the does not prevent a - from moving or resizing an . + from moving or resizing an . + +The setting of the does not prevent +moving the with the arrow keys while the + is selected. References: revChangeWindowSize (command), group (command), object (glossary), property (glossary), handler (glossary), Pointer tool (glossary), group (glossary), file (keyword), player (keyword), image (keyword), scrollbar (keyword), card (keyword), -control (glossary), height (property), -lockCursor (property), lockLocation (property), width (property), -location (property) +control (glossary), height (property), lockCursor (property), +width (property), location (property) Tags: ui From f00719033a4ec508b42d62c0dab8174be9669167 Mon Sep 17 00:00:00 2001 From: livecodesam Date: Fri, 11 Oct 2019 12:13:28 +0100 Subject: [PATCH 007/402] Create Bugfix-19848.md --- docs/notes/Bugfix-19848.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/notes/Bugfix-19848.md diff --git a/docs/notes/Bugfix-19848.md b/docs/notes/Bugfix-19848.md new file mode 100644 index 00000000000..0ef9fcb498c --- /dev/null +++ b/docs/notes/Bugfix-19848.md @@ -0,0 +1 @@ +# Clarified in the docs how objects can still move when lockLocation is true From f0262e11d90e430cf8cfdf80bbf83e22dcf89508 Mon Sep 17 00:00:00 2001 From: Brian Milby Date: Tue, 29 Oct 2019 22:07:24 -0400 Subject: [PATCH 008/402] [[Bugfix 22433]] Update selectionChanged Clarified that selectionChanged is not sent when the text changes --- docs/dictionary/message/selectionChanged.lcdoc | 4 ++++ docs/notes/bugfix-22433.md | 1 + 2 files changed, 5 insertions(+) create mode 100644 docs/notes/bugfix-22433.md diff --git a/docs/dictionary/message/selectionChanged.lcdoc b/docs/dictionary/message/selectionChanged.lcdoc index 9c003a75d4a..3eca37a4c6e 100644 --- a/docs/dictionary/message/selectionChanged.lcdoc +++ b/docs/dictionary/message/selectionChanged.lcdoc @@ -29,6 +29,10 @@ The is sent to a whenever the user makes a text or moves the in the , after the is changed. +>*Note:* If the selection change is a result of the text being added or +removed (for example, cut or paste over selected text), + will not be sent, but rather . + The is sent to a whenever the user a portion of the sound or movie, or when a sets the or diff --git a/docs/notes/bugfix-22433.md b/docs/notes/bugfix-22433.md new file mode 100644 index 00000000000..53964f20532 --- /dev/null +++ b/docs/notes/bugfix-22433.md @@ -0,0 +1 @@ +# Clarified that selectionChanged is not sent when the text changes From 7508be2b84645be3aec2e7eec30d46b700633737 Mon Sep 17 00:00:00 2001 From: livecodepanos Date: Thu, 28 Nov 2019 15:22:31 +0200 Subject: [PATCH 009/402] [21566] Fix crash when opening and closing modal windows Problem: When opening and closing modal windows continuously in a specific stack, at some point this error was thrown: ``` [NSApplication runModalSession:] may not be invoked inside of transaction begin/commit pair, or inside of transaction commit (usually this means it was invoked inside of a view's -drawRect: method.) The modal dialog has been suppressed to avoid deadlock. ``` After that, a crash occurred in a random place each time. The previous error was thrown when this line was executed, in MCMacPlatformEndModalSession(): `[s_modal_sessions[t_final_index - 1] . window -> GetHandle() orderOut: nil];` Solution: It looks like in this case the suggested approach is to defer the operation until the next iteration of the main run loop: https://forums.developer.apple.com/thread/74394 https://forums.developer.apple.com/thread/88825 So wrapping this line with: `[performSelector: withObject: afterDelay:]` causes the error to disappear, and I can no longer get the app to crash. --- docs/notes/bugfix-21566.md | 1 + engine/src/mac-core.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs/notes/bugfix-21566.md diff --git a/docs/notes/bugfix-21566.md b/docs/notes/bugfix-21566.md new file mode 100644 index 00000000000..f97a5f80b0e --- /dev/null +++ b/docs/notes/bugfix-21566.md @@ -0,0 +1 @@ +# Fix crash when opening and closing modal windows under some circumstances diff --git a/engine/src/mac-core.mm b/engine/src/mac-core.mm index 246716c2281..1fc629e5bbc 100644 --- a/engine/src/mac-core.mm +++ b/engine/src/mac-core.mm @@ -868,7 +868,7 @@ void MCMacPlatformEndModalSession(MCMacPlatformWindow *p_window) return; [NSApp endModalSession: s_modal_sessions[t_final_index - 1] . session]; - [s_modal_sessions[t_final_index - 1] . window -> GetHandle() orderOut: nil]; + [s_modal_sessions[t_final_index - 1] . window -> GetHandle() performSelector:@selector(orderOut:) withObject:nil afterDelay:0]; s_modal_sessions[t_final_index - 1] . window -> Release(); s_modal_session_count -= 1; } From daafb50c81c33bb1f2f69a3be8d7b0bd0241ab70 Mon Sep 17 00:00:00 2001 From: Trevor DeVore Date: Thu, 19 Dec 2019 11:38:57 -0600 Subject: [PATCH 010/402] Fix multi-codepoint character parsing in JSONImport() --- docs/notes/bugfix-22511.md | 2 ++ extensions/libraries/json/json.lcb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 docs/notes/bugfix-22511.md diff --git a/docs/notes/bugfix-22511.md b/docs/notes/bugfix-22511.md new file mode 100644 index 00000000000..72a4d46fc5e --- /dev/null +++ b/docs/notes/bugfix-22511.md @@ -0,0 +1,2 @@ +# Fix multi-codepoint character parsing in JSONImport() + diff --git a/extensions/libraries/json/json.lcb b/extensions/libraries/json/json.lcb index dd6630b0c6a..8859d1715b7 100644 --- a/extensions/libraries/json/json.lcb +++ b/extensions/libraries/json/json.lcb @@ -53,7 +53,7 @@ end handler -- characters are shown in "\uXXXX" format, and other characters are -- shown literally. private handler FormatChar(in pChar as String) returns String - if the code of pChar > 0x1f then + if the code of codeunit 1 of pChar > 0x1f then return pChar else return "\\u" & (the code of pChar converted to base 16) @@ -269,7 +269,7 @@ public handler JsonImport(in pJson as String) returns optional any put kScanEndToken into tScanState else if tChar is "\\" then put kScanInStringEscape into tScanState - else if the code of tChar <= 0x1f then + else if the code of codeunit 1 of tChar <= 0x1f then -- RFC 7159 requires control characters inside string literals -- to be escaped. Control characters are those within the -- range U+0000 to U+001F inclusive From 7ee2074eaf8491d813b6c3f645dcc2d451b16ce5 Mon Sep 17 00:00:00 2001 From: Ian Macphail Date: Tue, 14 Jan 2020 16:36:15 +0000 Subject: [PATCH 011/402] [[ WindowsPlayer ]] Ensure player is in pause state at start & end of play This patch updates the Windows DirectShow player to ensure the pause state is entered into at load time and when playback has ended. This ensures the appropriate frame of video is displayed when stopped, and maintains the currently set stop time of the player. --- engine/src/w32-ds-player.cpp | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/engine/src/w32-ds-player.cpp b/engine/src/w32-ds-player.cpp index 71535e71036..cf719c71cc0 100644 --- a/engine/src/w32-ds-player.cpp +++ b/engine/src/w32-ds-player.cpp @@ -126,7 +126,7 @@ class MCWin32DSPlayer : public MCPlatformPlayer bool SetCallbackMarkers(const MCPlatformPlayerDurationArray &p_markers); bool Play(); - bool Pause(); + bool Pause(bool p_stop = false); bool SeekRelative(int32_t p_amount); bool SetPositions(MCPlatformPlayerDuration p_start, MCPlatformPlayerDuration p_finish); @@ -320,7 +320,7 @@ bool MCWin32DSPlayer::HandleGraphEvent() Play(); else { - m_control->StopWhenReady(); + Pause(true); MCPlatformCallbackSendPlayerFinished(this); } break; @@ -965,6 +965,8 @@ bool MCWin32DSPlayer::SetUrl(MCStringRef p_url) if (!t_success) CloseFile(); + Pause(); + //InvalidateRect(m_video_window, NULL, FALSE); //UpdateWindow(m_video_window); //m_MediaViewer->Pause(); @@ -1054,7 +1056,7 @@ bool MCWin32DSPlayer::SetCurrentPosition(MCPlatformPlayerDuration p_position) return false; // Enter paused state if not currently playing - if (m_state == kMCWin32DSPlayerStopped) + if (m_state != kMCWin32DSPlayerRunning) return Pause(); return true; @@ -1103,6 +1105,10 @@ bool MCWin32DSPlayer::SetPositions(MCPlatformPlayerDuration p_start, MCPlatformP if (t_result != S_OK && t_result != S_FALSE) // S_FALSE -> no change return false; + // If not playing, pausing here will make sure the next frame is displayed + if (m_state != kMCWin32DSPlayerRunning) + return Pause(m_state == kMCWin32DSPlayerStopped); + return true; } @@ -1325,19 +1331,34 @@ bool MCWin32DSPlayer::Play() } //pause playback -bool MCWin32DSPlayer::Pause() +bool MCWin32DSPlayer::Pause(bool p_stop) { if (m_control == nil) return false; HRESULT t_result; t_result = m_control->Pause(); - if (t_result != S_OK && t_result != S_FALSE) + + if (t_result == S_FALSE) + { + OAFilterState t_state; + t_result = m_control->GetState(10, &t_state); + while (t_result == VFW_S_STATE_INTERMEDIATE) + { + MCscreen->wait(0.01, false, true); + t_result = m_control->GetState(10, &t_state); + } + } + + if (t_result == E_FAIL) return false; StopTimer(); - m_state = kMCWin32DSPlayerPaused; + if (p_stop) + m_state = kMCWin32DSPlayerStopped; + else + m_state = kMCWin32DSPlayerPaused; return true; } From aa0c7586c76efae2ca087906bd6e9d54a05d1dec Mon Sep 17 00:00:00 2001 From: Ian Macphail Date: Tue, 14 Jan 2020 15:09:49 +0000 Subject: [PATCH 012/402] [[ Bug 22363 ]] Add release note for bug 22363 This patch adds a release note for bug 22363, where the windows player would sometimes show the wrong video frame when the currentTime property was changed while paused. --- docs/notes/bugfix-22363.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/notes/bugfix-22363.md diff --git a/docs/notes/bugfix-22363.md b/docs/notes/bugfix-22363.md new file mode 100644 index 00000000000..9b4c0c86339 --- /dev/null +++ b/docs/notes/bugfix-22363.md @@ -0,0 +1 @@ +# Windows Player now shows the correct video frame when the currentTime is changed while playback is paused. \ No newline at end of file From cf690efd9b2c6e9d30d19e7ed66125ebfe14754b Mon Sep 17 00:00:00 2001 From: livecodesam Date: Thu, 23 Jan 2020 09:35:00 +0000 Subject: [PATCH 013/402] Rename Bugfix-19848.md to bugfix-19848.md --- docs/notes/{Bugfix-19848.md => bugfix-19848.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/notes/{Bugfix-19848.md => bugfix-19848.md} (100%) diff --git a/docs/notes/Bugfix-19848.md b/docs/notes/bugfix-19848.md similarity index 100% rename from docs/notes/Bugfix-19848.md rename to docs/notes/bugfix-19848.md From 5fa5ed5fa4703029cdea0ea39ef3d1530d93569f Mon Sep 17 00:00:00 2001 From: Monte Goulding Date: Tue, 13 Aug 2019 13:24:33 +1000 Subject: [PATCH 014/402] [[ Debug ]] Doc and tweaks for android debugging This path documents how to debug and profile an android debug build using Android Studio. It also makes some minor tweaks to our builds to take a couple of steps that would need to be done each build out of the process. --- docs/development/build-android.md | 38 +++++++++++++++++++++++++++++++ engine/engine.gyp | 8 ++++--- tools/extract-debug-symbols.sh | 12 ++++++---- util/set_android_debuggable.sh | 12 ++++++++++ 4 files changed, 63 insertions(+), 7 deletions(-) create mode 100755 util/set_android_debuggable.sh diff --git a/docs/development/build-android.md b/docs/development/build-android.md index e6c322a36be..f952b63086d 100644 --- a/docs/development/build-android.md +++ b/docs/development/build-android.md @@ -133,3 +133,41 @@ The Linux build environment used for compiling LiveCode for Android is based on * openjdk-7-jdk * flex * bison + +## Debugging & Profiling with Android Studio + +* Build a debug build of the android engine +* Inside android-XXX-bin, create a symlink librevandroid.so -> Standalone-Community +(or Standalone-Commercial; whichever you're using) +* Build your standalone +* Start Android Studio and select "Profile or Debug APK" on the main menu. +* Select the APK you built +* Studio will show you the contents of your APK and there will be a banner + along the top about being unable to find debug symbols. Click it and navigate + to the folder where you created the librevandroid.so symlink. +* Set the paths to the source folders in the panel that appears if you want to +do debugging rather than profiling +* On the top right of the Android Studio toolbar, there are icons for running, +debugging and profiling. Select the one you want. +* If Android Studio complains about the SDK not being set, select the top-level +project in the left-hand tree view, right-click and go to Module Settings. Hunt +through those menus for SDK/API selections and make sure they're set properly +(they may default to "Java 1.8" rather than an Android SDK). +* If Android Studio complains about the app not having a default activity, quit +Studio and restart it. Keep doing this until it stops being stupid. +* If you selected "Profile", you'll see the profiler on the bottom of the +window. Click the "CPU" portion of the graphs. To do a trace, select +"Sample C++ methods" from the drop down and hit Record. Perform the action you +want to profile then click "Stop". +* If profiling says "Advanced profiling not available", you will likely need to +play around with MinimumSDK settings and the like when building the app. In +particular, make sure your device is at least API26 and that the minimum API +level is set to API26 too. +* The threads of interest are the one at the top of the list (the main Android +thread) and one further down called "Thread-2" - this is the engine thread. + +> **Note:** When you import an APK into Android Studio, the IDE creates a new +> project in your home directory under ApkProjects/, and makes a local copy of +> the target APK there. This means that if you rebuild or update the original +> APK, you need to manually import the updated version into Android Studio +> again. diff --git a/engine/engine.gyp b/engine/engine.gyp index 6205920b8ea..25eada469d6 100755 --- a/engine/engine.gyp +++ b/engine/engine.gyp @@ -349,13 +349,13 @@ [ { 'action_name': 'copy_manifest', - 'message': 'Copying manifest file', + 'message': 'Copying and update debuggable in manifest file', 'inputs': [ 'rsrc/android-manifest.xml', ], - + 'outputs': [ '<(PRODUCT_DIR)/Manifest.xml', @@ -363,7 +363,9 @@ 'action': [ - 'cp', '<@(_inputs)', '<@(_outputs)', + '../util/set_android_debuggable.sh', + '<@(_inputs)', + '<@(_outputs)', ], }, { diff --git a/tools/extract-debug-symbols.sh b/tools/extract-debug-symbols.sh index f4bf1febe90..77dbe2a1564 100755 --- a/tools/extract-debug-symbols.sh +++ b/tools/extract-debug-symbols.sh @@ -24,10 +24,14 @@ for input in "$@" ; do # Extract a copy of the debugging information $OBJCOPY --only-keep-debug "$input" "$output" - # Because we export symbols from the engine, only debug symbols - # should be stripped. - $STRIP -x --strip-debug "$input" - + if [ "$os" == "android" -a "$BUILDTYPE" == "Debug" ] ; then + echo Skipping strip-debug for ${input} + else + # Because we export symbols from the engine, only debug symbols + # should be stripped. + $STRIP -x --strip-debug "$input" + fi + # Add a hint for the debugger so it can find the debug info $OBJCOPY --remove-section=.gnu_debuglink "$input" $OBJCOPY --add-gnu-debuglink="$output" "$input" diff --git a/util/set_android_debuggable.sh b/util/set_android_debuggable.sh new file mode 100755 index 00000000000..09169ef8f51 --- /dev/null +++ b/util/set_android_debuggable.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +INPUT="$1" +OUTPUT="$2" + +if [ "$BUILDTYPE" == "Debug" ] ; then + sed 's/android:debuggable="false"/android:debuggable="true"/g' "${INPUT}" > "${OUTPUT}" +else + cp "${INPUT}" "${OUTPUT}" +fi From ef9ca5f83969f445c85b9ba3326ca1ccf606d41b Mon Sep 17 00:00:00 2001 From: livecodesam Date: Mon, 2 Mar 2020 09:41:11 +0000 Subject: [PATCH 015/402] [Bugfix-22596] Include Android in playLoudness docs --- docs/dictionary/property/playLoudness.lcdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dictionary/property/playLoudness.lcdoc b/docs/dictionary/property/playLoudness.lcdoc index cdea4edb86b..4cb9aed6a0b 100644 --- a/docs/dictionary/property/playLoudness.lcdoc +++ b/docs/dictionary/property/playLoudness.lcdoc @@ -9,7 +9,7 @@ Specifies the volume of sounds played by the play command. Introduced: 1.0 -OS: mac, windows, linux, ios +OS: mac, windows, linux, ios, android Platforms: desktop, server, mobile From 62cbb322833ea499e9acc0dace20689f40b822c9 Mon Sep 17 00:00:00 2001 From: livecodesam Date: Mon, 2 Mar 2020 09:43:09 +0000 Subject: [PATCH 016/402] Create bugfix-22596.md --- docs/notes/bugfix-22596.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/notes/bugfix-22596.md diff --git a/docs/notes/bugfix-22596.md b/docs/notes/bugfix-22596.md new file mode 100644 index 00000000000..6b3e144a4ff --- /dev/null +++ b/docs/notes/bugfix-22596.md @@ -0,0 +1 @@ +# Included Android as supported in the playLoudness dictionary entry From 497ae875e3015b902e682bca34789373a9f7f8f9 Mon Sep 17 00:00:00 2001 From: livecodesam Date: Mon, 2 Mar 2020 10:09:23 +0000 Subject: [PATCH 017/402] Update mobilePickDate.lcdoc --- docs/dictionary/command/mobilePickDate.lcdoc | 33 ++++++++------------ 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/docs/dictionary/command/mobilePickDate.lcdoc b/docs/dictionary/command/mobilePickDate.lcdoc index c9637961db9..1a18d3e3c7d 100644 --- a/docs/dictionary/command/mobilePickDate.lcdoc +++ b/docs/dictionary/command/mobilePickDate.lcdoc @@ -37,11 +37,6 @@ on displayDate -- the maximum date and time that can be selected put 5 into tInterval - // convert the dates into seconds since the UNIX Epoch - convert tSelected to seconds - convert tRangeStart to seconds - convert tRangeEnd to seconds - // launch the date and time picker mobilePickDate "dateTime" \ , tSelected, tRangeStart, tRangeEnd, tInterval @@ -53,7 +48,6 @@ on displayDate if tDateResult is 0 then put "No Selection Made" into field "DateField" else - convert tDateResult from seconds to internet date put tDateResult into field "DateField" end if end displayDate @@ -67,29 +61,29 @@ Android is "date" - "datetime" (default on iOS) (iOS only): display a native picker to choose the date and time -- "date" (default on Android): display a native picker to choose the - date -- "time": display a native picker to choose the time +- "date" (default on Android): display a native picker to choose the + date +- "time": display a native picker to choose the time current: The date, time or date and time that is to be displayed. If this is -empty, then the current date time is used. If this value is set, then it -must be specified in seconds. +empty, then the current date time is used. start: The start range of the date picker. If this value is empty, there is no lower boundary. The value is ignored if is greater than . -If this value is set then it must be specified in seconds. Start and end -parameters will be ignored on Android when picking 'time'. +Start and end parameters will be ignored on Android when picking 'time'. end: The end range of the date picker. If this value is empty, there is no upper boundary. The value is ignored if is greater than . -If this value is set then it must be specified in seconds. Start and end -parameters will be ignored on Android when picking 'time'. step (iOS -Only): Specifies the minute interval size. This parameter is ignored if -