Bike 2.0 (Preview 210)

New Bike 2.0 Preview today!

Still not ready for daily use, but improved! I do not expect that it will corrupt files or delete data, but there’s missing features and visual glitches.


Getting started… this version’s themes are incompatible with previous Bike 2 Preview themes. Make sure to use Window > Theme > Default to get a view of your outline.


This release has a much evolved theme system. Still rough spots, but a lot further along than before. Themes and related outline paths are the focus of this preview.

Look for:

  • New theme system design
  • Themes able to recreate Bike 1.0 visually
  • Many editor preferences are now working through themes
  • User’s guide with theme tutorial and outline path documentation

If you don’t have time to try things out you can watch a screencast of me stumbling through the theme tutorial here:

The high level theme design is same as last preview–javascript files that define rules. Rules are composed of an outline path and a callback function. When the outline path matches the callback function modifies the style.

Beyond that many details have changed.

The big difference is there are no longer any built in visual elements. Row’s no longer have a background color or border that you can set. There are no built in handle or guide controls.

Instead all visual elements are now added using decorations. Decorations never affect the layout of your outline. Instead they attach to existing layout elements–rows, row text, or row text runs.

I once again “think” this release is ready to start iterating on. I hope to shorten the release cycle to a week or two. My goal for this next release will be responding to any feedback and adding outline search. We’ll see!


Feedback.

Any feedback is welcome, especially thoughts on themes and how they might be improved. Themes have at least two design spaces, there is the underlying API, and then there is the design of a particular theme file. I think the underlying API is working pretty well for my goals. I feel like I’m still learning how best to create larger extensible/adjustable theme files.

Once you go through the theme tutorial make sure to dig into the default theme file to see how I’m accomplishing various features.

6 Likes

Brilliant design !

I’ve just been through the tutorial video, and being able to view all the detail of the theme settings through the Outline Path Explorer (live, while editing the theme file) is just extraordinary (and fast …) !

What is best practice for installing and testing the demo build ?
(I’ve tried running it from the IMG, and also from /Applications, in a vanilla testing account with full privileges, but I seem to be tripping up on an assertion error from a Swift library, when I first click in the demo window )


Expand disclosure triangle to view log
0   libswiftCore.dylib            	       0x1aa4f91e8 _assertionFailure(_:_:file:line:flags:) + 592
1   BikeOutliner                  	       0x103e45694 0x103ddc000 + 431764
2   BikeOutliner                  	       0x103e3e930 0x103ddc000 + 403760
3   BikeOutliner                  	       0x103e48cac 0x103ddc000 + 445612
4   BikeOutliner                  	       0x1041e3b88 0x103ddc000 + 4225928
5   BikeOutliner                  	       0x103dffff0 0x103ddc000 + 147440
6   BikeOutliner                  	       0x103e00198 0x103ddc000 + 147864
7   AppKit                        	       0x19d51a0f0 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 3672
8   AppKit                        	       0x19d4a56f8 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 384
9   AppKit                        	       0x19d4a53a8 -[NSWindow(NSEventRouting) sendEvent:] + 284
10  AppKit                        	       0x19dce3a08 -[NSApplication(NSEventRouting) sendEvent:] + 1656
11  Bike                          	       0x10279266c 0x102760000 + 206444
12  Bike                          	       0x1027926b4 0x102760000 + 206516
13  AppKit                        	       0x19d8eab04 -[NSApplication _handleEvent:] + 60
14  AppKit                        	       0x19d37189c -[NSApplication run] + 520
15  AppKit                        	       0x19d348068 NSApplicationMain + 888
16  Bike                          	       0x10278f2d4 0x102760000 + 193236
17  dyld                          	       0x1993a0274 start + 2840

UPDATE

Seems to be fine as long as I open an existing text file.
(The problem is only tripped here if I click in a newly created document).

1 Like

Super excited for the possibilities that theme styles will allow for. Perhaps a guardrail in the form of “reset to default theme” somewhere in the app settings or menu bar, where we can’t break anything, would be good. Currently it seems super easy to overwrite the defaults by accident.

1 Like

Ha, thanks!

I don’t think it should matter. Generally I run my version out of Xcode or from the desktop…

Ah, I think this is a known bug that I forgot to document. When a file is empty, with no rows, then there is a crash when you mouse down. I think it will fix itself if you Outline > New Row.

1 Like

Good idea. In the meantime if you delete the “Default.biketheme” and then restart Bike it will reinstall a fresh default theme.

2 Likes

Thinking (far) ahead to keeping Bike 1 and 2 scripts apart, I notice that the Bike 2 demo build is using the same id: com.hogbaysoftware.Bike

Does that seem likely to change ?

I don’t think so. At least I would like to keep the same unless it for some reason causes too many problems.

1 Like

Something analogous to Application("Bike").version() would be more than enough.

1 Like

Actually I think that’s already built in to default AppleScript support. I’m seeing a proper version property for the current Bike release using:

tell application "Bike"
	version
end tell
1 Like

assuming if I rename the app I could run 1.x and 2.x for testing purposes…I have a lot of bike files now and many stay open in 1.x and I dont want to hurt them :slight_smile:

I think that will work, and I don’t think Bike 2 will corrupt any files. Both versions do use the same bundle identifier, so changing preferences in one might (when keys are the same) change preferences in the other, but generally I have both versions on my computer and am using them without trouble.

I have downloaded the preview and it is installed as Bike2 but when I run it I can’t create or open an existing file. Screen is blank.
Any ideas Jessie?

Creating a new file should create a blank document (and tricky because if you click in the document Bike will crash), but if you press Return Bike should create a new row, and then you can click/etc without crash.

I haven’t seen problem where opening and existing file will show as blank even when it has content… I don’t think it would result in a blank document, but maybe make sure that you have selected the menu Window > Theme > Default?