Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/09/24 in all areas

  1. Dave Nottage

    Code for getting permissions not working in Delphi 11

    This: procedure(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>) Needs to be: procedure(const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray) I believe the change to the types was related to C++Builder compatibility
  2. Delphi 11.0 Enterprise (I Can't afford to buy new version. Need workaround, please.) PROBLEM Delphi 11.0 crashes everytime I try to delete a TStringColumn from StringGrid in a FMX form in the IDE. This is not during runtime. I can't seem to figure out how to remove the ones I currently built using the IDE. Any work arounds? I've tried to right click on the StringGrid and select Items Editor and select a TStringColumn and click delete.... crashes Delphi 11.0 runtime. SOLUTION Right click on the design, then click View as Text. Delete the objects and save unit. close the unit and reopen the unit. Fixed. HISTORY in how I got Delphi Enterprise: I am hobbyist that happened to hit a big lottery winning one year and decided to buy Delphi Enterprise 10.4 with the money, during that year I upgraded to Delphi 11.0. So, I'm stuck with it. I'll never be able to ever afford getting another Enterprise again. So, I look for workarounds.
  3. vfbb

    Slow rendering with SKIA on Windows

    @Hans♫ Please check your Form.Quality because the AntiAlias is direct related to the current form quality: https://github.com/skia4delphi/skia4delphi/blob/093ec41b1b951c68cbccaa885a84c19242e09fb7/Source/FMX/FMX.Skia.Canvas.pas#L1571 The AntiAlias of raster is forced to be always true because some preliminar tests proved to be apparently faster.
  4. CHackbart

    Android TV and remote control

    const DefaultKeys: Array [0 .. 284] of integer = ( (* soft_left *) 1, (* soft_right *) 2, (* home *) 3, (* back *) 4, (* call *) 5, (* endcall *) 6, (* 0 *) 7, (* 1 *) 8, (* 2 *) 9, (* 3 *) 10, (* 4 *) 11, (* 5 *) 12, (* 6 *) 13, (* 7 *) 14, (* 8 *) 15, (* 9 *) 16, (* star *) 17, (* pound *) 18, (* dpad_up *) 19, (* dpad_down *) 20, (* dpad_left *) 21, (* dpad_right *) 22, (* dpad_center *) 23, (* volume_up *) 24, (* volume_down *) 25, (* power *) 26, (* camera *) 27, (* clear *) 28, (* a *) 29, (* b *) 30, (* c *) 31, (* d *) 32, (* e *) 33, (* f *) 34, (* g *) 35, (* h *) 36, (* i *) 37, (* j *) 38, (* k *) 39, (* l *) 40, (* m *) 41, (* n *) 42, (* o *) 43, (* p *) 44, (* q *) 45, (* r *) 46, (* s *) 47, (* t *) 48, (* u *) 49, (* v *) 50, (* w *) 51, (* x *) 52, (* y *) 53, (* z *) 54, (* comma *) 55, (* period *) 56, (* alt_left *) 57, (* alt_right *) 58, (* shift_left *) 59, (* shift_right *) 60, (* tab *) 61, (* space *) 62, (* sym *) 63, (* explorer *) 64, (* envelope *) 65, (* enter *) 66, (* del *) 67, (* grave *) 68, (* minus *) 69, (* equals *) 70, (* left_bracket *) 71, (* right_bracket *) 72, (* backslash *) 73, (* semicolon *) 74, (* apostrophe *) 75, (* slash *) 76, (* at *) 77, (* num *) 78, (* headsethook *) 79, (* focus *) 80, (* plus *) 81, (* menu *) 82, (* notification *) 83, (* search *) 84, (* media_play_pause *) 85, (* media_stop *) 86, (* media_next *) 87, (* media_previous *) 88, (* media_rewind *) 89, (* media_fast_forward *) 90, (* mute *) 91, (* page_up *) 92, (* page_down *) 93, (* pictsymbols *) 94, (* switch_charset *) 95, (* button_a *) 96, (* button_b *) 97, (* button_c *) 98, (* button_x *) 99, (* button_y *) 100, (* button_z *) 101, (* button_l1 *) 102, (* button_r1 *) 103, (* button_l2 *) 104, (* button_r2 *) 105, (* button_thumbl *) 106, (* button_thumbr *) 107, (* button_start *) 108, (* button_select *) 109, (* button_mode *) 110, (* escape *) 111, (* forward_del *) 112, (* ctrl_left *) 113, (* ctrl_right *) 114, (* caps_lock *) 115, (* scroll_lock *) 116, (* meta_left *) 117, (* meta_right *) 118, (* function *) 119, (* sysrq *) 120, (* break *) 121, (* move_home *) 122, (* move_end *) 123, (* insert *) 124, (* forward *) 125, (* media_play *) 126, (* media_pause *) 127, (* media_close *) 128, (* media_eject *) 129, (* media_record *) 130, (* f1 *) 131, (* f2 *) 132, (* f3 *) 133, (* f4 *) 134, (* f5 *) 135, (* f6 *) 136, (* f7 *) 137, (* f8 *) 138, (* f9 *) 139, (* f10 *) 140, (* f11 *) 141, (* f12 *) 142, (* num_lock *) 143, (* numpad_0 *) 144, (* numpad_1 *) 145, (* numpad_2 *) 146, (* numpad_3 *) 147, (* numpad_4 *) 148, (* numpad_5 *) 149, (* numpad_6 *) 150, (* numpad_7 *) 151, (* numpad_8 *) 152, (* numpad_9 *) 153, (* numpad_divide *) 154, (* numpad_multiply *) 155, (* numpad_subtract *) 156, (* numpad_add *) 157, (* numpad_dot *) 158, (* numpad_comma *) 159, (* numpad_enter *) 160, (* numpad_equals *) 161, (* numpad_left_paren *) 162, (* numpad_right_paren *) 163, (* volume_mute *) 164, (* info *) 165, (* channel_up *) 166, (* channel_down *) 167, (* zoom_in *) 168, (* zoom_out *) 169, (* tv *) 170, (* window *) 171, (* guide *) 172, (* dvr *) 173, (* bookmark *) 174, (* captions *) 175, (* settings *) 176, (* tv_power *) 177, (* tv_input *) 178, (* stb_power *) 179, (* stb_input *) 180, (* avr_power *) 181, (* avr_input *) 182, (* prog_red *) 183, (* prog_green *) 184, (* prog_yellow *) 185, (* prog_blue *) 186, (* app_switch *) 187, (* button_1 *) 188, (* button_2 *) 189, (* button_3 *) 190, (* button_4 *) 191, (* button_5 *) 192, (* button_6 *) 193, (* button_7 *) 194, (* button_8 *) 195, (* button_9 *) 196, (* button_10 *) 197, (* button_11 *) 198, (* button_12 *) 199, (* button_13 *) 200, (* button_14 *) 201, (* button_15 *) 202, (* button_16 *) 203, (* language_switch *) 204, (* manner_mode *) 205, (* 3d_mode *) 206, (* contacts *) 207, (* calendar *) 208, (* music *) 209, (* calculator *) 210, (* zenkaku_hankaku *) 211, (* eisu *) 212, (* muhenkan *) 213, (* henkan *) 214, (* katakana_hiragana *) 215, (* yen *) 216, (* ro *) 217, (* kana *) 218, (* assist *) 219, (* brightness_down *) 220, (* brightness_up *) 221, (* media_audio_track *) 222, (* sleep *) 223, (* wakeup *) 224, (* pairing *) 225, (* media_top_menu *) 226, (* 11 *) 227, (* 12 *) 228, (* last_channel *) 229, (* tv_data_service *) 230, (* voice_assist *) 231, (* tv_radio_service *) 232, (* tv_teletext *) 233, (* tv_number_entry *) 234, (* tv_terrestrial_analog *) 235, (* tv_terrestrial_digital *) 236, (* tv_satellite *) 237, (* tv_satellite_bs *) 238, (* tv_satellite_cs *) 239, (* tv_satellite_service *) 240, (* tv_network *) 241, (* tv_antenna_cable *) 242, (* tv_input_hdmi_1 *) 243, (* tv_input_hdmi_2 *) 244, (* tv_input_hdmi_3 *) 245, (* tv_input_hdmi_4 *) 246, (* tv_input_composite_1 *) 247, (* tv_input_composite_2 *) 248, (* tv_input_component_1 *) 249, (* tv_input_component_2 *) 250, (* tv_input_vga_1 *) 251, (* tv_audio_description *) 252, (* tv_audio_description_mix_up *) 253, (* tv_audio_description_mix_down *) 254, (* tv_zoom_mode *) 255, (* tv_contents_menu *) 256, (* tv_media_context_menu *) 257, (* tv_timer_programming *) 258, (* help *) 259, (* navigate_previous *) 260, (* navigate_next *) 261, (* navigate_in *) 262, (* navigate_out *) 263, (* stem_primary *) 264, (* stem_1 *) 265, (* stem_2 *) 266, (* stem_3 *) 267, (* dpad_up_left *) 268, (* dpad_down_left *) 269, (* dpad_up_right *) 270, (* dpad_down_right *) 271, (* media_skip_forward *) 272, (* media_skip_backward *) 273, (* media_step_forward *) 274, (* media_step_backward *) 275, (* soft_sleep *) 276, (* cut *) 277, (* copy *) 278, (* paste *) 279, (* system_navigation_up *) 280, (* system_navigation_down *) 281, (* system_navigation_left *) 282, (* system_navigation_right *) 283, (* all_apps *) 284, (* refresh *) 285); .. if TPlatformServices.Current.SupportsPlatformService(IFMXKeyMappingService, KeyMappingService) then begin for i := 0 to high(DefaultKeys) do KeyMappingService.RegisterKeyMapping(DefaultKeys[i], DefaultKeys[i], TKeyKind.Usual); end; Thanks, I use the code above which seem to work fine with the remotes.
  5. Stefan Glienke

    RTTI info for TBytes using runtime packages

    The issue is that TBytes is an alias for TArray<Byte> - generic types being used across different modules have several implications such as that they manifest into each module with their own typeinfo being generated. Try this code for example: uses Rtti, SysUtils; var ctx: TRttiContext; begin Writeln(ctx.GetType(TypeInfo(TBytes)).QualifiedName); end. In a regular console application it will print: System.TArray<System.Byte> While you would assume that it should print: System.SysUtils.TBytes Now if you enable runtime packages for this console application and let it link with rtl you will get an ENonPublicType here. Every module that is using TBytes is not referencing some type that is declared in the RTL runtime package but emiting its own version of TArray<Byte> into its binary. Personally I think this is an issue with the compiler treating the declaration of TBytes = TArray<Byte> different from TBytes = array of Byte in terms of the typeinfo generated - I was sure there is a QP entry somewhere about it but I cannot find it right now. To further provide the proof that aforementioned assumptions of other posters are wrong use the following code with a console application linking with the rtl package: uses Rtti, TypInfo, Classes, SysUtils; var ctx: TRttiContext; begin Writeln(ctx.GetType(TBytesStream).GetField('FBytes').FieldType.Handle = TypeInfo(TBytes)); end. This will print FALSE as the typeinfo of the FBytes field which is of type System.SysUtils.TBytes in fact differs from the typeinfo generated for the usage of TBytes in the console application binary. In fact there does not even exist a type called TBytes but only System.TArray<System.Byte> as TBytes it just an alias as I said and the declaration TBytes = type TArray<Byte> is not legit and raises E2574 Instantiated type can not be used for TYPE'd type declaration
×