Rollo62
Members-
Content Count
1812 -
Joined
-
Last visited
-
Days Won
23
Everything posted by Rollo62
-
Getting FireMonkey iOS development off the ground
Rollo62 replied to eivindbakkestuen's topic in Cross-platform
We have all the same goal in mind, but Apple does its best to keep this goal as far and impossible as it could be 🙂 I'm afraid you have to work through all the docs and threads that are out there, all the time. Embarcadero has a quite good explanation of the whole process for the start, but it may break easily at every little step in every little building block involved (MemberCenter certificates/provisioning, key chain old/double provisioning files, Macos setup, Macos updates, Macos version, Platform CPU, iOS version, iOS/Macos off-sync. versions, XCode version, SDK-Versions, SDK-Missing internal parts, network/wifi connection, Transporter version, AppStore, certificate, DeviceID, Device image, PAServer, Delphi version, ...). Even XCode itself sometimes cannot resolve everything smoothly, you will have to dive deep into all those forums. It would help if you would present a failure message you've got, to get more insights. Usually the best way is to prepare a new ID, certificates, devices in the MemberCenter manually and to use XCode to prepare iOS device for development, starting an empty project on iOS, it can manage provisioning files to some degree. Once it works, usually it stays quite stable for a long time. When you leave it alone for two or three weeks, you might see some provisioning issues and need to re-establish the connection sometimes (at least I have such experience here). -
Maybe that info helps too https://docwiki.embarcadero.com/RADStudio/Sydney/en/Working_with_Native_and_Custom_FireMonkey_Styles https://docwiki.embarcadero.com/RADStudio/Sydney/en/Applying_FireMonkey_Styles Does a call to ApplyStyleLookup() help ? https://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Forms.TCustomForm.ApplyStyleLookup
-
Ok, ok, here is a short demo maybe what you are looking for, additionally with some mouse drag-and-drop for the knob.. I would really recommend that you look into some books and the help before continuing, as well as checking out all the samples. Maybe that small demo helps for a start, but you should begin with the basics first. T465_Rotation_001.zip
-
What I spot without too much looking into details: Your inside TForm7 declaration, so don't write TForm7. here private { Private declarations } public { Public declarations } //function TForm7.KnobLabelStationAngle(const AAngle : Single) : String; overload; function KnobLabelStationAngle(const AAngle : Single) : String; overload; //function TForm7.KnobLabelFreqAngle(const AAngle : Single ) : Single; overload; function KnobLabelFreqAngle(const AAngle : Single ) : Single; overload; end;
-
You can simply add your function declaration and definition in the code window, similar like this: unit UMain_Form; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Layouts ; type TForm1 = class(TForm) private { Private declarations } public { Public declarations } function MakeANewFunction( const AParam : Single ) : String; end; var Form1: TForm1; implementation {$R *.fmx} { TForm1 } function TForm1.MakeANewFunction(const AParam: Single): String; begin if AParam > 100.0 then Result := 'Large' else if AParam >= 0.0 then Result := 'Small' else Result := 'Negative'; end; end. For these kind of questions you better look into a good, basic Delphi book, like this one from Marco Cantu.
-
function TForm7.GetMyStationNameFromAngleMethod( const AAngle : Single ) : String; const CStations : array[0..24-1] of String = ( 'New York, 'Honolulu', 'Tokyo' ... 'Paris' ); var LIdx : Integer; begin LIdx := AAngle div 15.0; // 0 ... 360 to 0 ... 23 Result := CStations[ LIdx ]; end; function TForm7.GetMyStationFreqFromAngleMethod( const AAngle : Single ) : Single; begin Result := (AAngle / 360.0) * 200.0; // 0 ... 360 to 0 ... 200.0 MHz end; procedure TForm7.KnobLeftClick(Sender: TObject); begin MyRoundRect.RotationAngle := MyRoundRect.RotationAngle - 15.0; Label1.Text := Format( 'My station is %s at %4.0f MHz, [ GetMyStationNameFromAngleMethod( MyRoundRect.RotationAngle ), GetMyStationFreqFromAngleMethod( MyRoundRect.RotationAngle ) ] ); end; procedure TForm7.KnobRightClick(Sender: TObject); begin MyRoundRect.RotationAngle := MyRoundRect.RotationAngle + 15.0; Label1.Text := Format( 'My station is %s at %4.0f MHz, [ GetMyStationNameFromAngleMethod( MyRoundRect.RotationAngle ), GetMyStationFreqFromAngleMethod( MyRoundRect.RotationAngle ) ] ); end; I assume you want to display the station name and frequency, right ? Just a rough idea, its already very late here ... Since I don't know exactly what you need this is a wild guess 🙂
-
procedure TForm7.FormCreate(Sender: TObject); begin MyRoundRect.RotationCenter.Point( Pointf( MyRoundRect.Position.X + MyRoundRect.Width / 2.0, MyRoundRect.Position.Y + MyRoundRect.Height / 2.0 ) ); end; procedure TForm7.KnobLeftClick(Sender: TObject); begin MyRoundRect.RotationAngle := MyRoundRect.RotationAngle - 15.0; end; procedure TForm7.KnobRightClick(Sender: TObject); begin MyRoundRect.RotationAngle := MyRoundRect.RotationAngle + 15.0; end; Something similar like this (Untested) ? Or even adding some smooth animation by TFloatAnimation, like this.
-
In FMX you have RotationAngle and RotationCenter, that should be doing it.
-
If you was to create a rhyming dictionary, how would you structure the database?
Rollo62 replied to Al T's topic in Databases
Since its about rhymes, probably the phonetic abstraction on the trailing parts of the words might be interesting, and maybe can more or less looked up in a DB. Playing around with this tool, Like: into But you're right, its hard to predict its general outcome without deeper knowledge of semantics, orthography, etc. On the other hand, is the phonetic transcription not all about the phonetic representation of spoken words ? So it would be my first candidate for the job.- 8 replies
-
- dictionary
- rhyming
-
(and 2 more)
Tagged with:
-
[Android / Delphi 10.4] How to access the log.d messages without monitor.bat?
Rollo62 replied to Fabian1648's topic in FMX
Yes, serialgames is a nice tool, I used that before too, but I'm not sure how well that is maintained. There would be also a solution from DelphiWorlds: DeviceLens -
I also have not measured, but I'm well aware that 7-Zip with *.7z format, also with the original 7-Zip binary, is encoding much slower than using other ZIP encoder. I'm not so sure about the decoding speed, probably its on par or even faster than ZIP there, but my critical path was the encoding side in an older project. It's very likely that compiled with pure Delphi its even slower, that is true.
-
@shineworld Thanks, thats an interesting solution 👍 Unfortunately it seems that is not very well maintained, maybe from 2013/14, I can only find some references from here: http://www.lab-z.com/lzma-压缩的例子/ http://www.birtles.org.uk/programming/ Do you know any more recent repository where the sources were maintained ?
-
7-Zip with using the *.7z format is able to produce compressed files larger than 2GB and can be integrated into Delphi app as well, by using the 7z.dll. I think 7-Zip with using the *.zip format also stops at 2GB, but I haven't checked this with recent versions.
-
How about something like TStringHelper.Split ? use System.SysUtils , System.Generics.Collections ; ... var LInput : String; LArray : TArray<String>; LElem : String; LStrQuo : String; begin LInput := '22-1, 22-2, 22-3'; LArray := LInput.Split( [ ',' ], TStringSplitOptions.ExcludeEmpty ); // Ignore empty elements for LElem in LArray do begin LStrQuo := LElem.Trim.QuotedString( '"' ); ... // Do something with the quoted in SQL end; end.
-
If you was to create a rhyming dictionary, how would you structure the database?
Rollo62 replied to Al T's topic in Databases
Maybe this database is helpful too, with real pronounciation examples and theoretical background. https://englishexplorations.check.uni-hamburg.de/basic-concepts-of-english-phonetics-and-pronunciation/ https://en.wikipedia.org/wiki/International_Phonetic_Alphabet https://www.internationalphoneticassociation.org/IPAcharts/IPA_chart_orig/pdfs/IPA_Kiel_2020_full.pdf If you use such IPA alphabet in the DB, then maybe its possible to find and run a specific soundex algorithm on that. I would doubt that the original soundex for the usual alphabet might help here, but its worth a try.- 8 replies
-
- dictionary
- rhyming
-
(and 2 more)
Tagged with:
-
Thanks, yes I know. But I'm afraid this would be simply getting too heavy for my app. Moreover Python alone doesn't come with OpenCV and OpenCV is too heavy as well. I hope the portions for marker detection could be stripped off separately, like using simple filters for that goal. My consideration is that simple, specific marker-shapes might exist that have simple, specific detection algorithms as well, to allow easy and simple detetion and location.
-
@Brian Evans Yes, but I hope that shirneworld has found any other stable marker detection without even OpenCV, which is not that Cross-Plattform too. OpenCV is of course perfect in this case. I still hope to find some simple algorithm for marker detection, like e.g. QR-Code detection, to be able to locate them on pictures without much external stuff. Yes, QR-Code detection algorithm was one of my favorites too, but maybe there could be even more optimized algorithms just fpr that purpose. The markes itself were not critical, can be any shape.
-
If you was to create a rhyming dictionary, how would you structure the database?
Rollo62 replied to Al T's topic in Databases
I'm not an expert with that, but I guess you have to structure the database with a phonetic interpretation of words. When you look at this https://www.rhymedb.com/ Moreover, how to handle other languages, I assume also there a phonetic interpretation might cover a few languages at once.- 8 replies
-
- dictionary
- rhyming
-
(and 2 more)
Tagged with:
-
Thats a great application, I was looking for a similar option to find and exactly locate markers and their positions in an image, but I'm afraid I cannot use P4D since this has to be CrossPlatform. Maybe you have evaluated and tested some pure Pascal or Algorithmic solutions to find markers and you could share it with us ? ( and I don't want to use Cloud-KI solutions either ).
-
Percent Calculations
Rollo62 replied to andyf2022's topic in Algorithms, Data Structures and Class Design
I think the main question here is: Which granularity of a single step the user really needs for setting something ? Is it full 0...255 or is 0...100 sufficient ? This can be depending on the application, the formulas above only make it more readable to the user in % -
Uwe Raabe had shown a proposal howto Kill LSP in the German DP, maybe that is more convenient.
-
I'm a little unsure about this fix is repairing now all cases. I had implemented some fixes in the FMX.Dialogs.iOS.pas file at different spots ( under constructor TFMXAlertViewInputDelegate.Create ) and have seen that Dave Nottage provided a fix RSP-37702 under "class function TCocoaDialogsService.CreateAlertView(". This fix now seems to be implemented in the original Delphi unit in Rx11.2 Patch1. I would remove this patched FMX.Dialogs.iOS.pas unit now from my "patched units" list, if there were no other known sideeffects with this unit. Still I'm trying to check all the places where this error might occur, but its a little hard to test all that. Has somebody maybe found any other dialog sideeffects, related where the buttons are mixed up, or is this original Delphi unit now 100% OK ?
- 9 replies
-
- fmx
- tdialogservice
-
(and 1 more)
Tagged with:
-
Do you know this introducion about Balsamiq and FMX Stencils from Sarina Du Pont ? https://blogs.embarcadero.com/prototyping-from-vision-to-ux-design/ I dont know if this is still valid, because its already older. Presonally I think Delphi FMX is "mockup" enough for me, using other tools inbetween FMX Designer and Code is only another dependency layer added, but I understand the urge to want that.
-
TidHTTP under FMX for android does not work
Rollo62 replied to JohnLM's topic in Network, Cloud and Web
You don't need to be a registered user, just download the ZIP file under "Code" button -
Maybe it helps what Uwe suggests in the German DP. Check according to Delphi Compiler - Conditions simply enter $(Platform) and in the program check with {$IFDEF iOSSimARM64 } https://docwiki.embarcadero.com/RADStudio/Sydney/en/Memory_Management